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

Cleanup errors and add body to error response #792

Merged
merged 2 commits into from
Nov 9, 2018

Conversation

elliott-davis
Copy link
Contributor

Signed-off-by: Elliott Davis elliott@excellent.io

@thesentinels
Copy link
Contributor

Thanks for the pull request! Here is what will happen next:

  1. Your PR will be reviewed by the maintainers
  2. If everything looks good, one of them will approve it, and your PR will be merged.

Thank you for contributing!

@@ -193,7 +193,9 @@ impl Into<HttpResponse> for Error {
Error::ParseIntError(_) => HttpResponse::new(StatusCode::BAD_REQUEST),
Error::Protocol(_) => HttpResponse::new(StatusCode::INTERNAL_SERVER_ERROR),
Error::BuilderCore(ref e) => HttpResponse::new(bldr_core_err_to_http(e)),
Error::DieselError(ref e) => HttpResponse::new(diesel_err_to_http(e)),
Error::DieselError(ref e) => {
HttpResponse::with_body(diesel_err_to_http(e), e.description().to_string())
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about exposing the description in the error - the changes we've made so far explicitly don't put error text in the body any longer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm okay with taking it out but we need some sort of debugging around these errors. Would adding a debug line in each error block be okay?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes we can add debug lines

Copy link
Contributor

@eeyun eeyun left a comment

Choose a reason for hiding this comment

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

So long as this is temporary I say we merge and find out what the heck is going on with the projects.

Elliott Davis added 2 commits November 9, 2018 11:17
Signed-off-by: Elliott Davis <elliott@excellent.io>
Signed-off-by: Elliott Davis <elliott@excellent.io>
@elliott-davis elliott-davis merged commit 1eb45d4 into master Nov 9, 2018
@elliott-davis elliott-davis deleted the elliott/error_cleanup branch November 9, 2018 17:19
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.

4 participants