diff --git a/singer_sdk/streams/rest.py b/singer_sdk/streams/rest.py index 983abefd6..381c38442 100644 --- a/singer_sdk/streams/rest.py +++ b/singer_sdk/streams/rest.py @@ -16,6 +16,7 @@ TypeVar, Union, ) +from urllib.parse import urlparse import backoff import requests @@ -186,6 +187,7 @@ def response_error_message(self, response: requests.Response) -> str: Returns: str: The error message """ + full_path = urlparse(response.url).path if 400 <= response.status_code < 500: error_type = "Client" else: @@ -193,7 +195,7 @@ def response_error_message(self, response: requests.Response) -> str: return ( f"{response.status_code} {error_type} Error: " - f"{response.reason} for path: {self.path}" + f"{response.reason} for path: {full_path}" ) def request_decorator(self, func: Callable) -> Callable: