-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add more http error values #2277
Conversation
siyul-park
commented
Sep 19, 2022
•
edited
Loading
edited
- Add more http error values.
You can not rename existing public variables - this is not backwards compatible and would break others repos compiling |
Ok, I rollback the "ErrStatusRequestEntityTooLarge" |
I personally like the addition of the additional error codes. Adding the HTTP Status Code as a comment might help to visualize the sort order. @siyual-park Could you add comments for the HTTP status codes too (for all errors) to make it obvious where to fit in further codes: var (
ErrUnsupportedMediaType = NewHTTPError(http.StatusUnsupportedMediaType) // HTTP 415 Unsupported Media Type
ErrNotFound = NewHTTPError(http.StatusNotFound) // HTTP 404 Not Found
ErrUnauthorized = NewHTTPError(http.StatusUnauthorized) // HTTP 401 Unauthorized
ErrForbidden = NewHTTPError(http.StatusForbidden) // HTTP 403 Forbidden``` |
Thanks for the good suggestions. i add comments for the HTTP status codes. |
Codecov ReportBase: 92.35% // Head: 92.80% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2277 +/- ##
==========================================
+ Coverage 92.35% 92.80% +0.45%
==========================================
Files 37 38 +1
Lines 4436 4506 +70
==========================================
+ Hits 4097 4182 +85
+ Misses 247 236 -11
+ Partials 92 88 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
LGTM!
The Go 1.20 CI errors are being worked on and unrelated.
@siyual-park Thanks for your contribution! |