mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-25 14:05:03 +00:00
improvement: check if response data is empty string
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user