PocketBase returns HTTP 400 with `{ ok: false, error: { code: 400,
message: "Failed to authenticate." } }` when the email isn't found
or the password is wrong. The dating server passes the envelope
through verbatim, so the previous client showed "Failed to
authenticate." in English with no hint about what to do next.
Login now translates that pattern to "Email o contraseña incorrectos.
Si no tienes cuenta, regístrate primero." — the second clause is the
common case when a user mistakes the demo for an existing account
and tries to log in before registering.
Detection lives in the page (not in the API client) because it's a
UI-copy concern, not a contract issue: the server's structured
`error.code` is genuinely the upstream HTTP status here, and other
400 responses from this endpoint (e.g. `missing_field` on an empty
body) keep their own dedicated branches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
master
parent
9399cc58a6
commit
c6392c317f
Loading…
Reference in new issue