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 http error decorator #62

Merged
merged 2 commits into from
Oct 7, 2024
Merged

Fix http error decorator #62

merged 2 commits into from
Oct 7, 2024

Conversation

vnazar
Copy link
Member

@vnazar vnazar commented Oct 7, 2024

Description

Este PR permite obtener los mensajes de error de la librería httpx cuando no son de tipo httpx.HTTPStatusError. Hasta el momento solo se atrapaba el error httpx.HTTPError, pero este era poco específico y fallaba cuando el error traía el atributo .response (el cual solo tiene httpx.HTTPStatusError).

Requirements

None.

Additional changes

  • Se aprovecha de renombrar el decorador can_raise_http_error a can_raise_fintoc_error, ya que es más correcto.

@vnazar vnazar requested a review from daleal October 7, 2024 17:31
Copy link
Member

@daleal daleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buena! Se ve súper. Dejé unos cambios, en un lugar falta un espacio y en otro es más un tema del estilo de los paréntesis. Te la apruebo igual por mientras

fintoc/utils.py Outdated Show resolved Hide resolved
tests/test_utils.py Outdated Show resolved Hide resolved
@vnazar vnazar force-pushed the fix/fix-http-error-decorator branch from ae474af to 8a6d8f2 Compare October 7, 2024 20:21
@vnazar vnazar force-pushed the fix/fix-http-error-decorator branch from 8a6d8f2 to 4c3041d Compare October 7, 2024 20:28
@vnazar vnazar merged commit 3f79cf7 into master Oct 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants