Skip to content
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

fix: send proper error code in case of bad request #38

Merged
merged 2 commits into from
May 19, 2023
Merged

Conversation

bsushmith
Copy link
Collaborator

@bsushmith bsushmith commented May 17, 2023

  • If the id is empty or invalid in request, server should return 400 bad request instead of 500 internal server error

fixes: #37

@coveralls
Copy link

coveralls commented May 17, 2023

Pull Request Test Coverage Report for Build 5022390962

  • 21 of 27 (77.78%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 75.912%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/appeal/service.go 7 9 77.78%
api/handler/v1beta1/appeal.go 7 11 63.64%
Totals Coverage Status
Change from base Build 5000259638: 0.005%
Covered Lines: 8112
Relevant Lines: 10686

💛 - Coveralls

- If the id is empty or invalid in request, server should return 400 bad request instead of 500 internal server error
- fix and add test cases
@bsushmith bsushmith merged commit e115c98 into main May 19, 2023
4 checks passed
@bsushmith bsushmith deleted the error-codes branch May 19, 2023 09:35
lifosmin pushed a commit to lifosmin/guardian that referenced this pull request Aug 31, 2023
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.

incorrect error code for request with invalid appeal id
3 participants