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

feat(error): add predicates for too-large and status parse errors #2538

Merged
merged 2 commits into from
May 13, 2021

Conversation

acfoltzer
Copy link
Member

The discussion in #2462 opened up some larger questions about more comprehensive approaches to the error API, with the agreement that additional methods would be desirable in the short term. These methods address an immediate need of our customers, so I would like to get them in first before we flesh out a future solution.

One potentially controversial choice here is to still return true from is_parse_error() for these variants. I hope the naming of the methods make it clear that the new predicates are refinements of the existing one, but I didn't want to change the behavior of is_parse_error() which would require a major version bump.

The discussion in hyperium#2462 opened up some larger questions about more comprehensive approaches to the
error API, with the agreement that additional methods would be desirable in the short term. These
methods address an immediate need of our customers, so I would like to get them in first before we
flesh out a future solution.

One potentially controversial choice here is to still return `true` from `is_parse_error()` for
these variants. I hope the naming of the methods make it clear that the new predicates are
refinements of the existing one, but I didn't want to change the behavior of `is_parse_error()`
which would require a major version bump.
@acfoltzer acfoltzer force-pushed the acf/error-predicates branch from 0fd4111 to 0c1471e Compare May 6, 2021 17:30
@davidpdrsn davidpdrsn added the A-error Area: error handling label May 7, 2021
@acfoltzer
Copy link
Member Author

What's the preferred way to update a branch with the latest from master here? Rebase and force-push, merge commit, etc?

@seanmonstar
Copy link
Member

A rebase and force push is perfectly fine.

@seanmonstar seanmonstar enabled auto-merge (squash) May 13, 2021 01:18
@seanmonstar seanmonstar disabled auto-merge May 13, 2021 01:30
@seanmonstar seanmonstar merged commit 960a69a into hyperium:master May 13, 2021
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this pull request Jul 26, 2021
…tus` methods (hyperium#2538)

The discussion in hyperium#2462 opened up some larger questions about more comprehensive approaches to the
error API, with the agreement that additional methods would be desirable in the short term. These
methods address an immediate need of our customers, so I would like to get them in first before we
flesh out a future solution.

One potentially controversial choice here is to still return `true` from `is_parse_error()` for
these variants. I hope the naming of the methods make it clear that the new predicates are
refinements of the existing one, but I didn't want to change the behavior of `is_parse_error()`
which would require a major version bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error Area: error handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants