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

Return a 404 when a block is not found. #719

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Return a 404 when a block is not found. #719

merged 2 commits into from
Oct 7, 2021

Conversation

winder
Copy link
Contributor

@winder winder commented Oct 6, 2021

Summary

Return a 404 instead of 500 when /v2/blocks/:round fails due to a missing block.

Test Plan

New unit test.

api/handlers.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2021

Codecov Report

Merging #719 (5095078) into develop (7e2eff0) will increase coverage by 0.19%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #719      +/-   ##
===========================================
+ Coverage    53.55%   53.75%   +0.19%     
===========================================
  Files           23       23              
  Lines         3671     3676       +5     
===========================================
+ Hits          1966     1976      +10     
+ Misses        1442     1436       -6     
- Partials       263      264       +1     
Impacted Files Coverage Δ
idb/postgres/postgres.go 46.34% <0.00%> (-0.11%) ⬇️
api/handlers.go 14.45% <100.00%> (+2.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e2eff0...5095078. Read the comment docs.

@winder winder merged commit a46708f into develop Oct 7, 2021
@winder winder deleted the will/block-404 branch October 7, 2021 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message when requesting a block that isn't there.
3 participants