From 50206721ce60d6a91a89620df43bce03f4499dea Mon Sep 17 00:00:00 2001 From: Paul G Date: Fri, 22 Mar 2024 12:19:22 +0100 Subject: [PATCH] fix: ajout de logger sur la transmission par api_key (#3612) Co-authored-by: Paul Gaucher --- server/src/common/actions/organismes/organismes.actions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/common/actions/organismes/organismes.actions.ts b/server/src/common/actions/organismes/organismes.actions.ts index 84cf79dc0..07d99b7e2 100644 --- a/server/src/common/actions/organismes/organismes.actions.ts +++ b/server/src/common/actions/organismes/organismes.actions.ts @@ -519,6 +519,7 @@ export async function getOrganismeDetails(ctx: AuthContext, organismeId: ObjectI export async function getOrganismeByAPIKey(api_key: string, queryString: Request["query"]): Promise { const organisme = await organismesDb().findOne({ api_key }); if (!organisme) { + logger.error({ module: "transmission", api_key, queryString }, "Cannot find organisme from api_key"); throw Boom.forbidden("La clé API n'est pas valide", { queryString }); } return organisme;