-
Notifications
You must be signed in to change notification settings - Fork 887
refactor: replace Code by Detail in the http API error #1011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Should we create a function to centralize these messages? |
Codecov Report
@@ Coverage Diff @@
## main #1011 +/- ##
==========================================
+ Coverage 67.08% 67.10% +0.02%
==========================================
Files 256 256
Lines 14986 14986
Branches 136 136
==========================================
+ Hits 10053 10056 +3
+ Misses 3938 3935 -3
Partials 995 995
Continue to review full report at Codecov.
|
Co-authored-by: G r e y <grey@coder.com>
…der/coder into bq/1008/replace-code-by-detail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but we should get approval from @coder/backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, the idea of the Code
field is to allow a machine-readable error message.
Should we maybe keep both Code
and Detail
fields instead?
The idea short-term is to try eliminating machine-readable messages in favor of HTTP response codes. If that doesn't work, we'll probably have to do something like that. |
Closes #1008