Skip to content

Commit

Permalink
Merge branch 'feat/vardef-client-add-tests-exceptions' of github.com:…
Browse files Browse the repository at this point in the history
…statisticsnorway/dapla-toolbelt-metadata into feat/vardef-client-add-tests-exceptions
  • Loading branch information
tilen1976 committed Dec 12, 2024
2 parents dc21337 + 56d527c commit 9f22080
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/dapla_metadata/variable_definitions/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}")

Expand Down

0 comments on commit 9f22080

Please sign in to comment.