Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix status handling

Fang-Pen Lin453dc578299b
diff --git a/backend/src/ee/services/pki-acme/pki-acme-challenge-dal.ts b/backend/src/ee/services/pki-acme/pki-acme-challenge-dal.ts
index 665eb1f9ed..424651aeac 100644
--- a/backend/src/ee/services/pki-acme/pki-acme-challenge-dal.ts
+++ b/backend/src/ee/services/pki-acme/pki-acme-challenge-dal.ts
@@ -62,7 +62,7 @@ export const pkiAcmeChallengeDALFactory = (db: TDbClient) => {
try {
const [challenge] = (await (tx || db)(TableName.PkiAcmeChallenge)
.where({ id })
- .update({ status: AcmeChallengeStatus.Valid, validatedAt: new Date() })
+ .update({ status: AcmeChallengeStatus.Invalid })
.returning("*")) as [TPkiAcmeChallenges];
// Update pending auth to valid as well
diff --git a/backend/src/server/plugins/error-handler.ts b/backend/src/server/plugins/error-handler.ts
index 8f6b631419..1142694b53 100644
--- a/backend/src/server/plugins/error-handler.ts
+++ b/backend/src/server/plugins/error-handler.ts
@@ -251,7 +251,8 @@ export const fastifyErrHandler = fastifyPlugin(async (server: FastifyZodProvider
reqId: req.id,
status: error.status,
type: `urn:ietf:params:acme:error:${error.type}`,
- detail: error.detail
+ detail: error.detail,
+ message: error.message
// TODO: add subproblems if they exist
});
} else {