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