mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 17:29:14 +00:00
feat(infisical-pg): wrapped saml get option in try catch
This commit is contained in:
@@ -34,6 +34,7 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
|
||||
{
|
||||
passReqToCallback: true,
|
||||
getSamlOptions: async (req, done) => {
|
||||
try {
|
||||
const { ssoIdentifier } = req.params;
|
||||
if (!ssoIdentifier) throw new BadRequestError({ message: "Missing sso identitier" });
|
||||
|
||||
@@ -60,6 +61,10 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
|
||||
}
|
||||
(req as unknown as FastifyRequest).ssoConfig = ssoConfig;
|
||||
done(null, samlConfig);
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
done(error as Error);
|
||||
}
|
||||
}
|
||||
},
|
||||
async (req, profile, cb) => {
|
||||
|
||||
Reference in New Issue
Block a user