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
Current behavior
Server-side messages are already fairly consistent -
utils/friendlyError.jsandutils/duplicateKeyError.jsproduce 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 singleshowStatus(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:50falls back to the literal string'Request failed'(no period, no context) whenever the server doesn't send anerrorfield - this doesn't match the tone/punctuation of every other message in the app.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
'Request failed'.popup.jsandoptions.jsfor tone/punctuation consistency (sentence case, ends with a period, no raw error codes or stack traces reaching the UI).Relevant files
src/shared/api.js(apiRequest,ApiError)extension/popup/popup.js(showStatusand its call sites)extension/options/options.js(showStatus)utils/friendlyError.js(reference for the existing server-side tone)Acceptance criteria