feat(infisical-pg): added global error handler, try catch in oauth passport

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:23 +05:30
parent 4f619d7e48
commit bb6d482ff9
6 changed files with 76 additions and 27 deletions
@@ -8,6 +8,7 @@ import { SamlConfigsSchema } from "@app/db/schemas";
import { SamlProviders } from "@app/ee/services/saml-config/saml-config-types";
import { getConfig } from "@app/lib/config/env";
import { BadRequestError } from "@app/lib/errors";
import { logger } from "@app/lib/logger";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -79,6 +80,7 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
});
cb(null, { isUserCompleted, providerAuthToken });
} catch (error) {
logger.error(error);
cb(null, {});
}
},