Skip to content

Commit

Permalink
Add URL when logging failing http requests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieucan committed Feb 6, 2024
1 parent a41c345 commit 1bb23a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tap_apple_search_ads/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

def check_response(response: requests.Response) -> bool:
if response.status_code != 200:
message = "Received non-200 response code ([%s])"
logger.error(message, response.status_code)
message = "Received non-200 response code ([%s]) for URL %s"
logger.error(message, response.status_code, response.url)
logger.error("Response content: [%s]", response.text)

raise RuntimeError(message % response.status_code)
Expand Down

0 comments on commit 1bb23a7

Please sign in to comment.