fix: invalid-credentials code, no refresh on wrong pw
This commit is contained in:
@@ -16,7 +16,8 @@ rate limiter's own 429 text. The refusals were documented without a body schema.
|
||||
|
||||
**One body.** `api_types::ErrorResponse { error, code }`. `error` keeps its name and meaning (the
|
||||
SPA and existing clients read it); `code` is an additive, stable machine-readable field:
|
||||
`NOT_FOUND`, `INVALID_INPUT`, `UNAUTHORIZED`, `FORBIDDEN`, `CONFLICT`, `RATE_LIMITED`, `INTERNAL`.
|
||||
`NOT_FOUND`, `INVALID_INPUT`, `UNAUTHORIZED`, `INVALID_CREDENTIALS` (wrong password on a re-auth
|
||||
check; unlike `UNAUTHORIZED` it must not trigger a token refresh), `FORBIDDEN`, `CONFLICT`, `RATE_LIMITED`, `INTERNAL`.
|
||||
|
||||
**One constructor.** `errors::refuse(status, code, message) -> Response` is the only place a JSON
|
||||
error body is built. `ApiError` maps every `DomainError` variant to it with the status mapping that
|
||||
|
||||
Reference in New Issue
Block a user