fix: ensure login error strings are defined (#335)

This commit is contained in:
shenlan 2025-10-01 10:05:42 +08:00 committed by GitHub
parent 137c676383
commit e9f6e9e499

View File

@ -43,7 +43,7 @@ export default function LoginContent({ children }: LoginContentProps) {
missing_credentials: alerts.missingCredentials,
email_and_password_are_required: alerts.missingCredentials,
invalid_credentials: alerts.invalidCredentials,
user_not_found: alerts.userNotFound,
user_not_found: alerts.userNotFound ?? alerts.genericError,
}
const message = errorMap[normalizedError] ?? alerts.genericError
alert = { type: 'error', message }