This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Rpc: Return error if block does not exist#11743
Merged
CriesofCarrots merged 2 commits intoAug 20, 2020
Merged
Conversation
CriesofCarrots
commented
Aug 20, 2020
| data: None, | ||
| }, | ||
| RpcCustomError::BlockNotAvailable { slot } => Self { | ||
| code: ErrorCode::ServerError(JSON_RPC_SERVER_ERROR_4), |
Contributor
Author
Contributor
There was a problem hiding this comment.
I think that was just a silent protest against burning server errors. We only have 100 of them, and then the world ends
mvines
approved these changes
Aug 20, 2020
Contributor
|
automerge label removed due to a CI failure |
Codecov Report
@@ Coverage Diff @@
## master #11743 +/- ##
=======================================
Coverage 82.0% 82.0%
=======================================
Files 330 330
Lines 76742 76746 +4
=======================================
+ Hits 62966 62974 +8
+ Misses 13776 13772 -4 |
mergify Bot
pushed a commit
that referenced
this pull request
Aug 20, 2020
* Return error if block does not exist * Update docs (cherry picked from commit 747f8d5)
mergify Bot
pushed a commit
that referenced
this pull request
Aug 20, 2020
* Return error if block does not exist * Update docs (cherry picked from commit 747f8d5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The endpoints
getConfirmedBlockandgetBlockTimereturn success, butnulldata when a block is not available. This is particularly confusing in the latter case, sincegetBlockTimealso returnsnullif the block time is not available.Summary of Changes
Return a JSON-RPC error if block is not available for a slot