Skip to content

Commit

Permalink
Add raw response to cursor class
Browse files Browse the repository at this point in the history
  • Loading branch information
piby180 committed Jul 4, 2024
1 parent bc2d6e6 commit 4e81b23
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pinotdb/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,15 @@ def finalize_query_payload(
def normalize_query_response(self, input_query, query_response):
try:
payload = query_response.json()
self.raw_query_response = payload
self.raw_query_response = {
"response" : payload,
"response_status" : query_response.status_code
}
except Exception as e:
self.raw_query_response = {
"response" : query_response.text,
"response_status" : query_response.status_code
}
raise exceptions.DatabaseError(
f"Error when querying {input_query} from {self.url}, "
f"raw response is:\n{query_response.text}"
Expand Down

0 comments on commit 4e81b23

Please sign in to comment.