diff --git a/apps/server/src/core/error/loggable/axios-error.loggable.spec.ts b/apps/server/src/core/error/loggable/axios-error.loggable.spec.ts index f2b480a4bf7..201bf90c600 100644 --- a/apps/server/src/core/error/loggable/axios-error.loggable.spec.ts +++ b/apps/server/src/core/error/loggable/axios-error.loggable.spec.ts @@ -17,13 +17,13 @@ describe(AxiosErrorLoggable.name, () => { }; it('should return error log message', () => { - const { axiosErrorLoggable, error, axiosError } = setup(); + const { axiosErrorLoggable, error } = setup(); const result = axiosErrorLoggable.getLogMessage(); expect(result).toEqual({ type: 'mockType', - message: axiosError.message, + message: 'message: Bad Request code: 400', data: JSON.stringify(error), stack: 'mockStack', }); diff --git a/apps/server/src/core/error/loggable/axios-error.loggable.ts b/apps/server/src/core/error/loggable/axios-error.loggable.ts index 29e6ad32dad..c7e2d2c0fd1 100644 --- a/apps/server/src/core/error/loggable/axios-error.loggable.ts +++ b/apps/server/src/core/error/loggable/axios-error.loggable.ts @@ -11,7 +11,7 @@ export class AxiosErrorLoggable extends HttpException implements Loggable { getLogMessage(): LogMessage | ErrorLogMessage | ValidationErrorLogMessage { return { - message: this.axiosError.message, + message: `message: ${this.axiosError.message} code: ${this.axiosError.code || 'Unknown code'}`, type: this.type, data: JSON.stringify(this.axiosError.response?.data), stack: this.axiosError.stack, diff --git a/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.spec.ts b/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.spec.ts index a78b365d126..987cf7f0016 100644 --- a/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.spec.ts +++ b/apps/server/src/modules/oauth-provider/domain/error/hydra-oauth-failed-loggable-exception.spec.ts @@ -26,7 +26,7 @@ describe(HydraOauthFailedLoggableException.name, () => { expect(message).toEqual({ type: 'HYDRA_OAUTH_FAILED', - message: axiosError.message, + message: 'message: Bad Request code: 400', stack: axiosError.stack, data: JSON.stringify(error), }); diff --git a/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.spec.ts b/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.spec.ts index 6716175bdbe..c63db6d9124 100644 --- a/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.spec.ts +++ b/apps/server/src/modules/oauth/loggable/token-request-loggable-exception.spec.ts @@ -25,7 +25,7 @@ describe(TokenRequestLoggableException.name, () => { expect(logMessage).toStrictEqual({ type: 'OAUTH_TOKEN_REQUEST_ERROR', - message: axiosError.message, + message: 'message: Bad Request code: 400', data: JSON.stringify(error), stack: axiosError.stack, }); diff --git a/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts b/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts index ae477c00692..51042409e76 100644 --- a/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts +++ b/apps/server/src/modules/tool/external-tool/service/external-tool.service.ts @@ -63,8 +63,8 @@ export class ExternalToolService { try { await this.addExternalOauth2DataToConfig(tool.config); } catch (e) { - this.legacyLogger.debug( - `Could not resolve oauth2Config of tool with clientId ${tool.config.clientId}. It will be filtered out.` + this.legacyLogger.warn( + `Could not resolve oauth2Config of tool with clientId ${tool.config.clientId} and name ${tool.name}. It will be filtered out.` ); return undefined; }