-
Notifications
You must be signed in to change notification settings - Fork 326
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
feat: if json Serialize failure return 500 #321
Conversation
tide-core/src/response.rs
Outdated
.body(Body::from(v)), | ||
Err(e) => res | ||
.status(http::status::StatusCode::INTERNAL_SERVER_ERROR) | ||
.body(Body::from(e.to_string())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably shouldn't leak details to the client here; instead logging using log::error
and returning an empty body seems like a better option (:
CI's network problem. |
Looks to me like the requested changes were made (I agree, we don't want to expose the reason serialization failed, by default). I'd like to see this merged into Any objections to rebasing on |
Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version. - [Release notes](https://github.com/sebasmagri/env_logger/releases) - [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md) - [Commits](rust-cli/env_logger@v0.6.1...v0.7.0) Signed-off-by: dependabot-preview[bot] <[email protected]>
Updates the requirements on [juniper](https://github.com/graphql-rust/juniper) to permit the latest version. - [Release notes](https://github.com/graphql-rust/juniper/releases) - [Commits](graphql-rust/juniper@juniper-0.13.1...juniper-v0.14.0) Signed-off-by: dependabot-preview[bot] <[email protected]>
Updates the requirements on [uuid](https://github.com/uuid-rs/uuid) to permit the latest version. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/commits) Signed-off-by: dependabot-preview[bot] <[email protected]>
Resolve rustasync/http-rs#316
Description
If JSON Serialize failure return 500 and Error message.
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: