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

Projects
None yet
4 participants
@elliott-davis
Member

elliott-davis commented Nov 9, 2018

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

@thesentinels

This comment has been minimized.

Contributor

thesentinels commented Nov 9, 2018

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())

This comment has been minimized.

@chefsalim

chefsalim Nov 9, 2018

Member

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.

This comment has been minimized.

@elliott-davis

elliott-davis Nov 9, 2018

Member

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?

This comment has been minimized.

@chefsalim

chefsalim Nov 9, 2018

Member

Yes we can add debug lines

@eeyun

eeyun approved these changes Nov 9, 2018

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 some commits Nov 9, 2018

Elliott Davis
Cleanup errors and add body to error response
Signed-off-by: Elliott Davis <elliott@excellent.io>
Elliott Davis
cleanup misnamed json fields in UI
Signed-off-by: Elliott Davis <elliott@excellent.io>

@elliott-davis elliott-davis force-pushed the elliott/error_cleanup branch from 866f691 to c4c651c Nov 9, 2018

@elliott-davis elliott-davis requested review from cnunciato and mgamini as code owners Nov 9, 2018

@elliott-davis elliott-davis merged commit 1eb45d4 into master Nov 9, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
DCO This commit has a DCO Signed-off-by line

@elliott-davis elliott-davis deleted the elliott/error_cleanup branch Nov 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment