mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +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,
|
passReqToCallback: true,
|
||||||
getSamlOptions: async (req, done) => {
|
getSamlOptions: async (req, done) => {
|
||||||
|
try {
|
||||||
const { ssoIdentifier } = req.params;
|
const { ssoIdentifier } = req.params;
|
||||||
if (!ssoIdentifier) throw new BadRequestError({ message: "Missing sso identitier" });
|
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;
|
(req as unknown as FastifyRequest).ssoConfig = ssoConfig;
|
||||||
done(null, samlConfig);
|
done(null, samlConfig);
|
||||||
|
} catch (error) {
|
||||||
|
logger.error(error);
|
||||||
|
done(error as Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async (req, profile, cb) => {
|
async (req, profile, cb) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user