fix(api): reject a mail-less email domain by its own code (#2608)

This commit is contained in:
Hampus authored and Hampus Kraft committed 2026-09-08 22:17:53 +02:00
1 parent 8cc485cf81
commit c577b97f35
12 files changed
+302 -23

No files matched your search

@@ -128,6 +128,7 @@ export const ErrorCodeToI18nKey = {
[ValidationErrorCodes.INVALID_BASE64_FORMAT]: 'admin_and_system.invalid_format',
[ValidationErrorCodes.INVALID_EMAIL_FORMAT]: 'email.invalid_format',
[ValidationErrorCodes.INVALID_EMAIL_LOCAL_PART]: 'email.invalid_format',
[ValidationErrorCodes.EMAIL_DOMAIN_CANNOT_RECEIVE_MAIL]: 'email.domain_cannot_receive_mail',
[ValidationErrorCodes.EMAIL_DOMAIN_NOT_ALLOWED_FOR_SSO]: 'auth_and_oauth.email_domain_not_allowed_for_sso',
[APIErrorCodes.INVALID_HANDOFF_CODE]: 'auth_and_oauth.handoff_code_invalid',
[ValidationErrorCodes.INVALID_OR_EXPIRED_AUTHORIZATION_TICKET]:
@@ -254,6 +254,8 @@ export const ERROR_I18N_MESSAGES = {
'donation.magic_link_expired': 'Magic link has expired.',
'donation.magic_link_invalid': 'Magic link is invalid.',
'donation.magic_link_used': 'Magic link has already been used.',
'email.domain_cannot_receive_mail':
'That email domain cannot receive mail. Use an address on a domain that accepts email.',
'email.email_already_in_use': 'Email is already in use.',
'email.email_required': 'Email is required.',
'email.email_service_not_testable': 'Email service is temporarily unavailable. Please try again later.',