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

serde_json::Error locations are omitted from the backtrace #400

Open
vittorius opened this issue Dec 7, 2024 · 0 comments
Open

serde_json::Error locations are omitted from the backtrace #400

vittorius opened this issue Dec 7, 2024 · 0 comments

Comments

@vittorius
Copy link

Hey.

I'm returning an error of the following structure from my method with the return type anyhow::Result<()>. Strangely, when I try to log the backtrace, I can't see the lines related to the serde_json::Error that is the source:

// my logging function
pub(crate) fn log_endpoint_err(err: &anyhow::Error) {
    log::error!("{err}, {}", err.backtrace())
}

Can some frames be omitted from the backtrace under any circumstances?
Can a "gap" in the source() chain be a reason for this? (My error is "EOF when decoding a value", not an Io category of serde_json:Error's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant