Skip to content

Commit

Permalink
Return the correct missing block error code
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Feb 10, 2023
1 parent 5b0b8fa commit 2f54a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zebra-rpc/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ where
zebra_state::ReadResponse::BlockHash(Some(hash)) => hash,
zebra_state::ReadResponse::BlockHash(None) => {
return Err(Error {
code: ErrorCode::ServerError(0),
code: MISSING_BLOCK_ERROR_CODE,
message: "block height not in best chain".to_string(),
data: None,
})
Expand Down

0 comments on commit 2f54a52

Please sign in to comment.