mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 22:27:48 +00:00
Fix status handling
This commit is contained in:
@@ -62,7 +62,7 @@ export const pkiAcmeChallengeDALFactory = (db: TDbClient) => {
|
|||||||
try {
|
try {
|
||||||
const [challenge] = (await (tx || db)(TableName.PkiAcmeChallenge)
|
const [challenge] = (await (tx || db)(TableName.PkiAcmeChallenge)
|
||||||
.where({ id })
|
.where({ id })
|
||||||
.update({ status: AcmeChallengeStatus.Valid, validatedAt: new Date() })
|
.update({ status: AcmeChallengeStatus.Invalid })
|
||||||
.returning("*")) as [TPkiAcmeChallenges];
|
.returning("*")) as [TPkiAcmeChallenges];
|
||||||
|
|
||||||
// Update pending auth to valid as well
|
// Update pending auth to valid as well
|
||||||
|
|||||||
@@ -251,7 +251,8 @@ export const fastifyErrHandler = fastifyPlugin(async (server: FastifyZodProvider
|
|||||||
reqId: req.id,
|
reqId: req.id,
|
||||||
status: error.status,
|
status: error.status,
|
||||||
type: `urn:ietf:params:acme:error:${error.type}`,
|
type: `urn:ietf:params:acme:error:${error.type}`,
|
||||||
detail: error.detail
|
detail: error.detail,
|
||||||
|
message: error.message
|
||||||
// TODO: add subproblems if they exist
|
// TODO: add subproblems if they exist
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user