-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
Thanks for the pull request! Here is what will happen next:
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()) |
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.
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.
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.
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?
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.
Yes we can add debug lines
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.
So long as this is temporary I say we merge and find out what the heck is going on with the projects.
Signed-off-by: Elliott Davis <elliott@excellent.io>
Signed-off-by: Elliott Davis <elliott@excellent.io>
866f691
to
c4c651c
Compare
Signed-off-by: Elliott Davis elliott@excellent.io