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

enhancement: Return a 404 when a block is not found. #4479

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

shiqizng
Copy link
Contributor

Summary

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

Test Plan

Update handler test

@shiqizng shiqizng self-assigned this Aug 26, 2022
@shiqizng shiqizng changed the title Return a 404 when a block is not found. enhancement: Return a 404 when a block is not found. Aug 26, 2022
@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #4479 (ffda15d) into master (e4d6d42) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4479      +/-   ##
==========================================
- Coverage   55.19%   55.16%   -0.03%     
==========================================
  Files         398      398              
  Lines       50165    50173       +8     
==========================================
- Hits        27689    27679      -10     
- Misses      20159    20177      +18     
  Partials     2317     2317              
Impacted Files Coverage Δ
daemon/algod/api/server/v2/handlers.go 0.00% <0.00%> (ø)
util/db/dbutil.go 44.24% <0.00%> (-4.25%) ⬇️
ledger/acctupdates.go 69.29% <0.00%> (-0.60%) ⬇️
network/wsNetwork.go 64.63% <0.00%> (-0.20%) ⬇️
catchup/service.go 69.62% <0.00%> (+0.24%) ⬆️
catchup/peerSelector.go 100.00% <0.00%> (+1.04%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@algorandskiy
Copy link
Contributor

algorandskiy commented Aug 29, 2022

LGTM but technically this is an interface change.
Plus, the summary line/PR title should be rest api:/daemon:/xyz instead of enhancement

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.

5 participants