Skip to content

Failed login crashes the whole page instead of showing an error #212

Description

@joshunrau

Submitting the login form with a valid-looking but incorrect email/password does not show an inline "invalid credentials" message. Instead the Axios 401 response is left uncaught, propagates to the route's error boundary, and the entire page is replaced with a fatal "SOMETHING WENT WRONG / 401 - Unauthorized" screen with only "Error Report" and "Reload Page" buttons.

Repro:

  1. Go to /auth/login.
  2. Enter any email + any password that doesn't match an existing account.
  3. Click Login.

Console shows: AxiosError: Request failed with status code 401 bubbling up through <RouteComponent> to CatchBoundaryImpl.

The login mutation needs to catch this error and render it as a normal form error, not let it hit the route-level error boundary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions