Skip to content

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

fix some error handling logic

x0322058d655606c843
diff --git a/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx b/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx
index 7321430f09..5afaf152e5 100644
--- a/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx
+++ b/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx
@@ -214,7 +214,7 @@ export const ViewSecretRequestByIDPage = () => {
>
{step === "set-value" ? "Secret Request" : "Secret request shared"}
</h1>
- {secretRequest && (
+ {secretRequest?.request && (
<p
className="text-sm"
style={brandingTheme ? { color: brandingTheme.textMutedColor } : undefined}
@@ -255,13 +255,12 @@ export const ViewSecretRequestByIDPage = () => {
{secretRequest?.isSecretValueSet && (
<SecretValueAlreadySharedContainer brandingTheme={brandingTheme} />
)}
- {secretRequest?.error ||
- (error && !isInvalidCredential && !isUnauthorized && (
- <SecretRequestErrorContainer
- brandingTheme={brandingTheme}
- error={secretRequest?.error}
- />
- ))}
+ {(secretRequest?.error || (error && !isInvalidCredential && !isUnauthorized)) && (
+ <SecretRequestErrorContainer
+ brandingTheme={brandingTheme}
+ error={secretRequest?.error}
+ />
+ )}
{step === "success" && (
<SecretRequestSuccessContainer
requesterUsername={secretRequest!.request.requester.username}