feat: detect CORS errors and show actionable guidance on login

Distinguish CORS-blocked requests from genuine network failures using
a no-cors probe, so users deploying via Docker see a specific message
pointing to their JMAP server's CORS settings instead of a misleading
"unable to reach the server" error.
This commit is contained in:
Matthieu MALVACHE
2026-02-23 18:21:23 +01:00
committed by Matthieu MALVACHE
parent a0bb200da4
commit 913f673f73
12 changed files with 23 additions and 3 deletions
+1
View File
@@ -11,6 +11,7 @@
"error": {
"invalid_credentials": "E-mail ou senha inválidos",
"connection_failed": "Falha ao conectar com o servidor",
"cors_blocked": "O servidor está acessível mas está bloqueando requisições de origem cruzada. Verifique as configurações de CORS do seu servidor JMAP e permita este domínio.",
"generic": "Ocorreu um erro. Por favor, tente novamente.",
"totp_invalid": "Código de autenticação inválido. Verifique seu aplicativo de autenticação.",
"server_error": "O servidor está temporariamente indisponível. Tente novamente mais tarde."