Skip to content

Standardize user-facing error messages #10

Description

@DevOlabode

Current behavior

Server-side messages are already fairly consistent - utils/friendlyError.js and utils/duplicateKeyError.js produce plain-language, punctuated sentences ("Please sign in to continue.", "That username or password doesn't match."). The popup and options page both funnel API errors through a single showStatus(err.message) call (extension/popup/popup.js, ~10 call sites; extension/options/options.js:44).

The actual inconsistency is in the client:

  • src/shared/api.js:50 falls back to the literal string 'Request failed' (no period, no context) whenever the server doesn't send an error field - this doesn't match the tone/punctuation of every other message in the app.
  • The offline/unreachable-host message (src/shared/api.js:64-67) is a full paragraph with a suggested fix, while every other message is a single short sentence - worth a look, though it may be intentionally more detailed since it's actionable.

Goal

  • Give the client a single, consistent fallback message (short sentence, matching the server's style) instead of 'Request failed'.
  • Do a quick audit of user-visible strings in popup.js and options.js for tone/punctuation consistency (sentence case, ends with a period, no raw error codes or stack traces reaching the UI).
  • Don't change API response shapes or status codes - this is copy/consistency only.

Relevant files

  • src/shared/api.js (apiRequest, ApiError)
  • extension/popup/popup.js (showStatus and its call sites)
  • extension/options/options.js (showStatus)
  • utils/friendlyError.js (reference for the existing server-side tone)

Acceptance criteria

  • No generic/technical fallback string reaches the UI unexplained
  • Client and server error copy read as one consistent voice
  • No change to API status codes or response bodies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionBrowser extension (popup, options, background)good first issueGood for newcomersui/uxUser-facing interface or experience

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions