Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement: check if response data is empty string

Scott Wilsonfcdfcd0219d2
diff --git a/backend/src/services/secret/secret-queue.ts b/backend/src/services/secret/secret-queue.ts
index 3d75fa4f8c..84a8584ee9 100644
--- a/backend/src/services/secret/secret-queue.ts
+++ b/backend/src/services/secret/secret-queue.ts
@@ -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,