Merge pull request #3019 from Infisical/audit-log-stream-setup-error-improvement

Improvement: Propagate Upstream Error on Audit Log Stream Setup Fail
This commit is contained in:
Scott Wilson
2025-01-21 10:06:23 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -93,7 +93,7 @@ export const auditLogStreamServiceFactory = ({
}
)
.catch((err) => {
throw new Error(`Failed to connect with the source ${(err as Error)?.message}`);
throw new BadRequestError({ message: `Failed to connect with upstream source: ${(err as Error)?.message}` });
});
const encryptedHeaders = headers ? infisicalSymmetricEncypt(JSON.stringify(headers)) : undefined;
const logStream = await auditLogStreamDAL.create({

View File

@@ -103,7 +103,7 @@ export const AuditLogStreamForm = ({ id = "", onClose }: Props) => {
console.log(err);
createNotification({
type: "error",
text: "Failed to create stream"
text: (err as Error)?.message ?? "Failed to create stream"
});
}
};