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

Fix error type #2

Closed
mikedilger opened this issue Jul 16, 2017 · 2 comments
Closed

Fix error type #2

mikedilger opened this issue Jul 16, 2017 · 2 comments

Comments

@mikedilger
Copy link
Owner

Error type is currently hyper::Error, and as things stand upstream this is hard to move off of.

But we need to generalize this, and we need to do so in such a way that consumers of pemmican can extend the error type.

@mikedilger
Copy link
Owner Author

Consumers are no longer tied to hyper::Error. We map their error into a hyper::Error::Io using ErrorKind::Other. This is temporary until the following issue is resolved in hyper 0.12:
hyperium/hyper#1128

Handler functions should generally send 5xx error responses and return Ok

@mikedilger
Copy link
Owner Author

We no longer map back to a hyper error, but rather return InternalServerError to the client and send hyper a success. This is appropriate.

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

No branches or pull requests

1 participant