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

Ability to print JSON payload in the event of an error #13

Open
3 tasks
AntoniosBarotsis opened this issue Aug 6, 2024 · 0 comments
Open
3 tasks

Ability to print JSON payload in the event of an error #13

AntoniosBarotsis opened this issue Aug 6, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@AntoniosBarotsis
Copy link
Collaborator

This should be mostly useful for internal use (or for when submitting a bug report for the crate). The users of the crate shouldn't have to interact directly with the raw JSON ever since it is fully parsed into structs.

This won't add a new dependency since serde_json is already used by reqwest.

This is a low priority issue so I'll do this eventually™.

Checklist

  • replace all the response.json::<SomeStruct>().await?; calls to a response.text().await? and serde_json::from_str::<SomeStruct>(...) calls
  • Make sure to redact any sensitive information before saving to the error struct
  • Maybe feature gate (or debug build gate?) this entire thing to not move giant strings around all the time
@AntoniosBarotsis AntoniosBarotsis added the enhancement New feature or request label Aug 6, 2024
@AntoniosBarotsis AntoniosBarotsis self-assigned this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant