question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improvements to error messaging

See original GitHub issue

If you haven’t already, check out our contributing guidelines for onboarding!


View the job in Upwork here. Platform - version: ALL


Action Performed (reproducible steps): Summary: Currently, when a user encounters a sign-in error on expensify.cash, we display the raw API message to the user. We’d like to replace these responses so that when an error occurs, we display a user-friendly message instead.

The error codes and associated user-friendly messages are included in the Messaging section of this issue.

Steps to reproduce an example of the issue:

  1. Go to expensify.cash
  2. Sign in using an incorrect email address and password combination (i.e. a pair of credentials not associated with an account)
  3. See error code and generic error message appear (in red text).
    • Example: 401 No user with that partner/user/password

Desired Result: Show user-friendly error messages. Example: 401 error should show: Incorrect password

Actual Result Generic 401 No user with that partner/user/password appears

Notes/Photos/Videos: image


Messaging:

Error Code Message to display
401 Incorrect login or password. Please try again.
402 You have 2FA enabled on this account. Please sign in using your email or phone number.
403 Invalid login or password. Please try again or reset your password.
404 We were unable to change your password. This is likely due to an expired password reset link in an old password reset email. We have emailed you a new link so you can try again. Check your Inbox and your Spam folder; it should arrive in just a few minutes.
405 You do not have access to this application. Please add your GitHub username for access.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
yuwenmemoncommented, Jan 12, 2021

@ajay426 some of them may be harder to reproduce than others because of restrictions we have on the client. I would say establishing that the code works for one or two cases should be enough. I think I know how you can reproduce 405

405: Try logging in with an account that does not have access to the application but is an expensify account. You can create an invalidated “dummy” account on expensify.com (simply enter an email into the sign in, then log out right away. This will create an invalidated “dummy” account) and then try logging into the expensify.cash site.

EDIT: Also, just looking at the issue it seems like you simply need these for screenshots? In which case, I would just “simulate” those responses in JS for that.

1reaction
yuwenmemoncommented, Jan 8, 2021

@ajay426 your proposal looks good, and yes please use the jsonCode in the response from the API. Please proceed with a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Messages: Examples, Best Practices & Common Mistakes
4 common mistakes with error messages · 1. Ambiguity · 2. Condescending language/blaming the user · 3. Poor placement of error messages ·...
Read more >
Error Messages and How to Improve Them - ThinkTesting.com
Error Messages and How to Improve Them · Tone: be firm and authoritative, stating the facts of the situation in a neutral and...
Read more >
Fixing what's broken: How to improve your in-product error ...
In this post, I'll walk you through how we're improving our error messages using Polaris — Shopify's style guide — as a foundation....
Read more >
Error Message Improvement - SlideShare
Society for Technical Communication (STC) presentation which describes how technical writers can improve the quality of software error messages.
Read more >
When life gives you lemons, write better error messages
This is an example of a good error message. It explains what happened and why, provides reassurance, is empathetic, helps the user fix...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found