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

Log type that has failed to deserialize itself from a request #55

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Dec 7, 2023

Should help with debugging deserialization errors.

@Kobzol Kobzol force-pushed the log-deserialization-type branch from 85b7f83 to 77542c0 Compare December 7, 2023 15:47
@Kobzol Kobzol force-pushed the log-deserialization-type branch from 77542c0 to 827a968 Compare December 7, 2023 16:01
@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 7, 2023

I pushed a different version that also logs the response body (otherwise it's hard to detect what is causing the error), at the cost of deserializing it to a string before parsing it as a JSON. Let me know what you think (the previous simpler commit is here).

src/utils.rs Outdated Show resolved Hide resolved
src/utils.rs Show resolved Hide resolved
src/utils.rs Show resolved Hide resolved
src/utils.rs Show resolved Hide resolved
Copy link
Member

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this since the feedback here shouldn't be considered blocking.

@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 11, 2023

Oh, sorry, I actually forgot to push the JSON formatting change, I think that it's a good idea.

@rylev rylev merged commit 1bc1e73 into rust-lang:master Dec 12, 2023
1 check passed
@Kobzol Kobzol deleted the log-deserialization-type branch December 12, 2023 13:58
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

Successfully merging this pull request may close these issues.

2 participants