Skip to content

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

fix: adjust connection timeout and improve error notification handling

Victor Hugo dos Santoseac1f5930723
diff --git a/backend/src/server/app.ts b/backend/src/server/app.ts
index 22b49ba82e..fefeb42f0f 100644
--- a/backend/src/server/app.ts
+++ b/backend/src/server/app.ts
@@ -75,7 +75,7 @@ export const main = async ({
genReqId: () => `req-${alphaNumericNanoId(14)}`,
trustProxy: true,
- connectionTimeout: appCfg.isHsmConfigured ? 90_000 : 60_000,
+ connectionTimeout: appCfg.isHsmConfigured ? 90_000 : 70_000,
ignoreTrailingSlash: true,
pluginTimeout: 40_000
}).withTypeProvider<ZodTypeProvider>();
diff --git a/frontend/src/hooks/api/reactQuery.tsx b/frontend/src/hooks/api/reactQuery.tsx
index d30b9a21f2..b80393cf51 100644
--- a/frontend/src/hooks/api/reactQuery.tsx
+++ b/frontend/src/hooks/api/reactQuery.tsx
@@ -193,17 +193,22 @@ export const onRequestError = (error: unknown) => {
);
return;
}
+ const errorMessage =
+ serverResponse?.message || "An unexpected error occurred. Please try again.";
+
createNotification({
title: "Bad Request",
type: "error",
- text: `${serverResponse.message}${serverResponse.message?.endsWith(".") ? "" : "."}`,
- copyActions: [
- {
- value: serverResponse.reqId,
- name: "Request ID",
- label: `Request ID: ${serverResponse.reqId}`
- }
- ]
+ text: `${errorMessage}${errorMessage.endsWith(".") ? "" : "."}`,
+ copyActions: serverResponse?.reqId
+ ? [
+ {
+ value: serverResponse.reqId,
+ name: "Request ID",
+ label: `Request ID: ${serverResponse.reqId}`
+ }
+ ]
+ : undefined
});
}
};