Skip to content

Commit

Permalink
resolved comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed Oct 8, 2024
1 parent 5ddabed commit bf8f7ff
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions qbosdk/apis/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ def _query_get_all_generator(self, object_type: str, url: str) -> Generator[Dict
if not query_response or object_type not in query_response:
break

logger.debug('Response for get request for url: %s, %s', url, query_response)
logger.debug('Response for get request for url: %s, %s', url, response.text)

yield query_response[object_type]

start_position += 1000

except requests.exceptions.HTTPError as err:
logger.info('Response for get request for url: %s, %s', url, err.response)
logger.info('Response for get request for url: %s, %s', url, err.response.text)
if err.response.status_code == 400:
raise WrongParamsError('Some of the parameters are wrong', err.response.text)

Expand Down Expand Up @@ -259,7 +259,7 @@ def _post_request(self, data, api_url):
result = json.loads(response.text)
return result

logger.info('Payload for post request: %s', data)
logger.debug('Payload for post request: %s', data)
logger.info('Response for post request: %s', response.text)

if response.status_code == 400:
Expand Down Expand Up @@ -307,9 +307,14 @@ def _post_file(self, data, api_url):
)

if response.status_code == 200:
logger.debug('Response for post request: %s', response.text)
result = json.loads(response.text)
return result['AttachableResponse'][0]['Attachable']


logger.debug('Payload for post request: %s', data)
logger.info('Response for post request: %s', response.text)

if response.status_code == 400:
raise WrongParamsError('Some of the parameters are wrong', response.text)

Expand Down

0 comments on commit bf8f7ff

Please sign in to comment.