diff --git a/src/dapla_metadata/variable_definitions/exceptions.py b/src/dapla_metadata/variable_definitions/exceptions.py index 826fed5..7407d1e 100644 --- a/src/dapla_metadata/variable_definitions/exceptions.py +++ b/src/dapla_metadata/variable_definitions/exceptions.py @@ -33,9 +33,6 @@ def __init__(self, response_body: str) -> None: response_body (str): The raw response body string, stored for debugging purposes. - Raises: - None: The constructor handles invalid JSON and missing keys - gracefully, defaulting to error messages. """ self.detail: str | list try: @@ -49,7 +46,7 @@ def __init__(self, response_body: str) -> None: self.response_body = response_body except (json.JSONDecodeError, TypeError): self.status = "Unknown" - self.detail = "Invalid response body" + self.detail = "Could not decode error response from API" data = None super().__init__(f"Status {self.status}: {self.detail}")