Merge pull request #2946 from akhilmhdh/feat/updated-saml-error-message

Updated saml error message
This commit is contained in:
Maidul Islam
2025-01-07 10:57:03 -05:00
committed by GitHub

View File

@@ -123,7 +123,10 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
`email: ${email} firstName: ${profile.firstName as string}`
);
throw new Error("Invalid saml request. Missing email or first name");
throw new BadRequestError({
message:
"Missing email or first name. Please double check your SAML attribute mapping for the selected provider."
});
}
const userMetadata = Object.keys(profile.attributes || {})