Merge pull request #2841 from Infisical/integration-error-improvement

Improvement: Integration Error - Handle Response Data Empty String
This commit is contained in:
Maidul Islam
2024-12-04 23:39:33 -05:00
committed by GitHub

View File

@ -932,8 +932,12 @@ export const secretQueueFactory = ({
);
const message =
(err instanceof AxiosError ? JSON.stringify(err?.response?.data) : (err as Error)?.message) ||
"Unknown error occurred.";
// eslint-disable-next-line no-nested-ternary
(err instanceof AxiosError
? err?.response?.data
? JSON.stringify(err?.response?.data)
: err?.message
: (err as Error)?.message) || "Unknown error occurred.";
await auditLogService.createAuditLog({
projectId,