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

bug: incorrect error message in parse_block_hash_str "invalid block height" should be "invalid block hash" #94

Open
0xB10C opened this issue Jan 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@0xB10C
Copy link
Owner

0xB10C commented Jan 17, 2025

The error message in parse_block_hash_str "invalid block height" should be "invalid block hash".

if hash_str.len() != 64 || !hash_str.starts_with("000000") {
log::warn!(target: "web_handler", "parse_block_hash_str: invalid block height {}", hash_str);
return Err(error::ErrorNotFound(ERROR_INVALID_BLOCK_HASH));
}

Err(e) => {
log::warn!(target: "web_handler", "parse_block_hash_str: invalid block height {}: {}", hash_str, e);
Err(error::ErrorNotFound(ERROR_INVALID_BLOCK_HASH))
}

@0xB10C 0xB10C added the bug Something isn't working label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant