improvement: propogate upstream error on audit log stream setup

This commit is contained in:
Scott Wilson
2025-01-21 09:54:33 -08:00
parent 938c06a2ed
commit 51fe7450ae
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({