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

AstraDB (+async) should use the request handler for correct management of 4xx and 5xx #181

Closed
hemidactylus opened this issue Jan 31, 2024 · 0 comments · Fixed by #185
Closed
Assignees

Comments

@hemidactylus
Copy link
Collaborator

Contrary to the collection classes, the AstraDB and AsyncAstraDB classes have this in their request method:

responsebody = cast(API_RESPONSE, response.json())

i.e. unprotected json coercion regardless e.g. of HTTP 500 errors and the like. Thus, the user would see the error as an unparseable JSON.

Proposed solution:
the request methods should use the same request handler as done in the collection classes.

(thanks @nicoloboschi for bringing this up!)

@erichare erichare self-assigned this Jan 31, 2024
erichare added a commit that referenced this issue Jan 31, 2024
@erichare erichare linked a pull request Jan 31, 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
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants