Skip to content

feat: distinguish server/login errors with clear notifications#382

Open
simon-wilmes wants to merge 1 commit into
overleaf-workshop:masterfrom
simon-wilmes:issue-381
Open

feat: distinguish server/login errors with clear notifications#382
simon-wilmes wants to merge 1 commit into
overleaf-workshop:masterfrom
simon-wilmes:issue-381

Conversation

@simon-wilmes

Copy link
Copy Markdown

Previously, adding a wrong server URL was accepted silently and login failures only showed a generic "Login failed." (or a bare HTTP status like "400"), with network errors swallowed entirely.

The API layer now classifies failures into machine-readable categories (unreachable / not-overleaf / unauthorized / unknown) and the display layer maps them to localized, user-facing messages:

  • addServer probes the URL (unauthenticated, no credentials, manual redirect, 5s timeout) and warns with "Add anyway" if it is unreachable or does not look like an Overleaf/ShareLaTeX server.
  • passportLogin surfaces the server's own message for rejected logins (400/401/200), e.g. "Email address is invalid", falling back to a localized message when only an i18n key is returned.
  • cookiesLogin treats a redirect to /login as an invalid/expired session rather than misreporting a valid server as "not an Overleaf server".

Closes #381

Previously, adding a wrong server URL was accepted silently and login
failures only showed a generic "Login failed." (or a bare HTTP status
like "400"), with network errors swallowed entirely.

The API layer now classifies failures into machine-readable categories
(unreachable / not-overleaf / unauthorized / unknown) and the display
layer maps them to localized, user-facing messages:

- addServer probes the URL (unauthenticated, no credentials, manual
  redirect, 5s timeout) and warns with "Add anyway" if it is unreachable
  or does not look like an Overleaf/ShareLaTeX server.
- passportLogin surfaces the server's own message for rejected logins
  (400/401/200), e.g. "Email address is invalid", falling back to a
  localized message when only an i18n key is returned.
- cookiesLogin treats a redirect to /login as an invalid/expired session
  rather than misreporting a valid server as "not an Overleaf server".

Closes overleaf-workshop#381

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Clear notifications when adding/logging into a server fails

1 participant