equinor / equinor/osdu-sdk-python

Better error message in error handling or at least logging in post_returning_json and get_returning_json

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13
Forks
6
PR merge metrics
No merged PRs in 30d

Description

When (client.py ) post_returning_json (and get_returing_json and put_returning.json) is called without param ok_status_codes
only the response code 200 is added as status code that is ok before calling self.post. But when another status code than 200 is returned, the error message is " HTTPError(response=response)" which doesn't provide enough information.
It's is necessary to dot into the response proprty of the exception to find the response code. Is it possible to have the error code in the str representation of the HttpError?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.