Skip to content

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

Re-trigger tests

Daniel Hougaard55ca9149d5bd
diff --git a/backend/src/server/plugins/add-errors-to-response-schemas.ts b/backend/src/server/plugins/add-errors-to-response-schemas.ts
index a9ea6f8822..e37243ebae 100644
--- a/backend/src/server/plugins/add-errors-to-response-schemas.ts
+++ b/backend/src/server/plugins/add-errors-to-response-schemas.ts
@@ -1,3 +1,4 @@
+/* eslint-disable no-param-reassign */
import fp from "fastify-plugin";
import { DefaultResponseErrorsSchema } from "../routes/sanitizedSchemas";
@@ -5,15 +6,12 @@ import { DefaultResponseErrorsSchema } from "../routes/sanitizedSchemas";
export const addErrorsToResponseSchemas = fp(async (server) => {
server.addHook("onRoute", (routeOptions) => {
if (routeOptions.schema && routeOptions.schema.response) {
- // eslint-disable-next-line no-param-reassign
routeOptions.schema.response = {
...DefaultResponseErrorsSchema,
...routeOptions.schema.response
};
} else {
- // eslint-disable-next-line no-param-reassign
routeOptions.schema = routeOptions.schema || {};
- // eslint-disable-next-line no-param-reassign
routeOptions.schema.response = { ...DefaultResponseErrorsSchema };
}
});