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.

Provide errors with exact explanation what is wrong.

See original GitHub issue

We need to improve error messages on oxauth. I believe bad examples are in specs directly. Sample from spec:

{
   "error":"invalid_request",
   "description": "The request is missing a required parameter, includes an unsupported parameter or parameter value, or is otherwise malformed."
}

Is parameter missing? What exactly parameter is missing? Or maybe all are present but some are not supported? Or it is malformed? It is too generic. From beginning we followed spec examples and as for errors it looks very bad. So indeed lets think how to better improve it.

I propose in description provide exact reason. Like

{
   "error":"invalid_request",
   "description":"redirect_uri parameter is missed."
}

Otherwise if we want to keep it very close to specs examples then we can add “reason” json key:

{
   "error":"invalid_request",
   "description": "The request is missing a required parameter, includes an unsupported parameter or parameter value, or is otherwise malformed.",
   "reason":"redirect_uri parameter is missed."
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
qbert2kcommented, Jul 19, 2018

I like option B adding a reason key in json response.

0reactions
yuriyzcommented, May 16, 2019

Most of the errors now have additional reason field in error response that provides exact reason of the failure. Some errors are not covered since it requires major code refactoring which is unwanted because it may effect stability (e.g. inner ifs in Authorization Endpoint). We should improve it during other features development and refactor major flow handling. For now considering it as solved.

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 >
Practices of Science: Scientific Error
Error causes results that are inaccurate or misleading and can misrepresent nature. Scientifically accepted values are scientists' current best approximations, ...
Read more >
How to Write Good Error Messages - UX Planet
1. Be Clear And Not Ambiguous ... Write error message in clear and simple language. User should be able to understand the problem...
Read more >
Experimental Errors - digipac.ca
Experimental Errors. It is impossible to make an exact measurement. Therefore, all experimental results are wrong. Just how wrong they are depends on...
Read more >
Errors in Measurement - Math is Fun
Measuring instruments are not exact! Degree of Accuracy. Accuracy depends on the instrument you are measuring with. But as a general rule: The...
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