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

Add an exception type for HTTP status code 412 #1093

Open
briantist opened this issue Oct 16, 2023 · 0 comments · May be fixed by #1149
Open

Add an exception type for HTTP status code 412 #1093

briantist opened this issue Oct 16, 2023 · 0 comments · May be fixed by #1149
Labels
adapters related to the Adapter system breaking-change enhancement a new feature or addition
Milestone

Comments

@briantist
Copy link
Contributor

Right now there's no exception type for 412 status codes that get returned for eventual consistency failures, so we return UnexpectedError which is not very helpful on its own.

_STATUS_EXCEPTION_MAP = {

Adding a dedicated type would be good for being able to catch this, or at least getting more useful feedback, though I'll stress that retries are better handled during the request: https://hvac.readthedocs.io/en/stable/advanced_usage.html#retrying-failed-requests

@briantist briantist added enhancement a new feature or addition adapters related to the Adapter system breaking-change labels Oct 16, 2023
@briantist briantist added this to the 3.0.0 milestone Oct 20, 2023
mweigel added a commit to mweigel/hvac that referenced this issue Apr 4, 2024
* Fix hvac#1093 by adding PreconditionFailed exception for status code 412
* Add UnsupportedOperation exception for status code 405
mweigel added a commit to mweigel/hvac that referenced this issue Apr 5, 2024
* Prepare for hvac#1093 by adding PreconditionFailed exception for status code 412
* Add UnsupportedOperation exception for status code 405
briantist pushed a commit that referenced this issue Apr 13, 2024
* Prepare for #1093 by adding PreconditionFailed exception for status code 412
* Add UnsupportedOperation exception for status code 405
@briantist briantist linked a pull request Apr 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters related to the Adapter system breaking-change enhancement a new feature or addition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant