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

connection.execute(): only JSON-decode when response is JSON #499

Closed
soxofaan opened this issue Nov 8, 2023 · 2 comments
Closed

connection.execute(): only JSON-decode when response is JSON #499

soxofaan opened this issue Nov 8, 2023 · 2 comments

Comments

@soxofaan
Copy link
Member

soxofaan commented Nov 8, 2023

In #498 a user used con.execute() trying to get a GeoTIFF, but that failed because con.execute() is doing JSON decoding by default:

).json() # TODO: only do JSON decoding when mimetype is actually JSON?

this should only be done if response mime type is actually JSON.
And return raw bytes otherwise?

VictorVerhaert added a commit that referenced this issue Jan 18, 2024
github issue #499
added try/except to connection.execute to catch json decode errors
If a json decode error occurs, the response is return raw
@VictorVerhaert
Copy link
Contributor

Added a simple try/catch approach. However not quite sure how to test this.

VictorVerhaert added a commit that referenced this issue Jan 19, 2024
VictorVerhaert added a commit that referenced this issue Jan 29, 2024
github issue #499
auto_decode argument added to datacube.execute
VictorVerhaert added a commit that referenced this issue Jan 29, 2024
VictorVerhaert added a commit that referenced this issue Jan 30, 2024
VictorVerhaert added a commit that referenced this issue Jan 30, 2024
VictorVerhaert added a commit that referenced this issue Feb 2, 2024
VictorVerhaert added a commit that referenced this issue Feb 2, 2024
@soxofaan
Copy link
Member Author

soxofaan commented Feb 7, 2024

fixed by #529

@soxofaan soxofaan closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants