Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
nit: small patch to request error status
Maidul Islama6ead9396c5e
diff --git a/backend/src/server/plugins/error-handler.ts b/backend/src/server/plugins/error-handler.tsindex da3162ef89..cacc91885e 100644--- a/backend/src/server/plugins/error-handler.ts+++ b/backend/src/server/plugins/error-handler.ts@@ -15,15 +15,15 @@ export const fastifyErrHandler = fastifyPlugin(async (server: FastifyZodProviderreq.log.error(error);if (error instanceof BadRequestError) {res.status(400).send({ statusCode: 400, message: error.message, error: error.name });- } else if (error instanceof UnauthorizedError || error instanceof ForbiddenRequestError) {+ } else if (error instanceof UnauthorizedError) {res.status(403).send({ statusCode: 403, message: error.message, error: error.name });} else if (error instanceof DatabaseError || error instanceof InternalServerError) {res.status(500).send({ statusCode: 500, message: "Something went wrong", error: error.name });} else if (error instanceof ZodError) {res.status(403).send({ statusCode: 403, error: "ValidationFailure", message: error.issues });} else if (error instanceof ForbiddenError) {- res.status(403).send({- statusCode: 403,+ res.status(401).send({+ statusCode: 401,error: "PermissionDenied",message: `You are not allowed to ${error.action} on ${error.subjectType}`});diff --git a/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx b/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsxindex bbc2fb49a8..329153b1d3 100644--- a/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx+++ b/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx@@ -81,13 +81,12 @@ export const ProjectIndexSecretsSection = ({ decryptFileKey }: Props) => {</div></div>)}- <p className="mb-2 text-lg font-semibold">Enable Blind Indices</p>+ <p className="mb-2 text-lg font-semibold">Action Required</p><p className="mb-4 leading-7 text-gray-400">Your project was created before the introduction of blind indexing. To continue accessingsecrets by name through the SDK, public API and web dashboard, please enable blind indexing.{" "}<b>- This is a one time process.{" "}- {membership.role !== ProjectMembershipRole.Admin && "Admin only operation"}+ {membership.role !== ProjectMembershipRole.Admin && "This is an admin only operation."}</b></p><ProjectPermissionCan I={ProjectPermissionActions.Edit} a={ProjectPermissionSub.Settings}>