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

[bug] Python SDK doesn't work as expected for HEAD as boolean #2944

Open
msyyc opened this issue Dec 5, 2024 · 0 comments
Open

[bug] Python SDK doesn't work as expected for HEAD as boolean #2944

msyyc opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.

Comments

@msyyc
Copy link
Member

msyyc commented Dec 5, 2024

If emitters are doing head as boolean, it should be:

  • 2xx is true
  • 404 is false
  • everything else is an error that needs to be thrown (as usual)

Current Python SDK doesn't work as ecpected:

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response)
if cls:
return cls(pipeline_response, None, {}) # type: ignore
return 200 <= response.status_code <= 299

@msyyc msyyc self-assigned this Dec 5, 2024
@msyyc msyyc added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

No branches or pull requests

1 participant