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

When the node executes data requests, HTTP errors are not logged #1289

Open
tmpolaczyk opened this issue Jun 10, 2020 · 0 comments
Open

When the node executes data requests, HTTP errors are not logged #1289

tmpolaczyk opened this issue Jun 10, 2020 · 0 comments
Labels
bug 🐜 Something isn't working UX / DX 🙋 Improvement to user experience / developer experience

Comments

@tmpolaczyk
Copy link
Contributor

PR #1277 we introduce a log line to handle failed RADON retrievals:

                 Err(e) => log::debug!("Failed result for source {}: {:?}", retrieve.url, e), 

But that line is never entered when the error e is an HTTP error, which seems to be the most common type of error in the current testnet. To fix that we need to handle early returns caused by the ? operator, the simple solution is to wrap the entire funcion and move the log outside that wrapper:

fn foo() {
    let foo_wrapped = || { /* code here */ };
    match foo_wrapped() { /* logs here */ }
}
@aesedepece aesedepece added bug 🐜 Something isn't working UX / DX 🙋 Improvement to user experience / developer experience labels Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐜 Something isn't working UX / DX 🙋 Improvement to user experience / developer experience
Projects
None yet
Development

No branches or pull requests

2 participants