Skip to content

[F] Standardize HTTP status codes #7851

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Boc-chi-no
Copy link
Contributor

Standardize HTTP status codes

  1. Improved Flexibility: Allows for dynamic status code determination based on specific error contexts.
  2. Enhanced Accuracy: Prevents the misuse of 200 OK in cases where an error status is more appropriate.

Link to the issue: #7842

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan.

Test plan

  1. Clone repo and get tools
  2. Test the project using go test ./...
  3. Build the project using go build -o gogs
  4. Run server, and check Admin Dashboard page

@Boc-chi-no Boc-chi-no requested a review from unknwon as a code owner November 30, 2024 03:00
Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 2.23881% with 131 lines in your changes missing coverage. Please review.

Project coverage is 10.78%. Comparing base (3650b32) to head (9b7ae83).
Report is 66 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7851      +/-   ##
==========================================
- Coverage   15.28%   10.78%   -4.51%     
==========================================
  Files         106      209     +103     
  Lines       13864    28738   +14874     
==========================================
+ Hits         2119     3099     +980     
- Misses      11465    25348   +13883     
- Partials      280      291      +11     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant