Skip to content

Commit

Permalink
add: response context
Browse files Browse the repository at this point in the history
  • Loading branch information
ghadeer-x committed Feb 26, 2024
1 parent a2a5ad0 commit 61676e1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ErrorResponseDetails(BaseModel):
message: str
ui_error_message: UIErrorMessage
context: Optional[dict] = None
response: Optional[dict] = None


class APIConfig(BaseModel):
Expand All @@ -28,7 +29,7 @@ class HTTPException(Exception):

try:
self.details = ErrorResponseDetails(**response.json().get("detail")) if response is not None else ErrorResponseDetails(** error.details.dict())

self.response = response.json().get("response", None)

except Exception as e:
Expand Down

0 comments on commit 61676e1

Please sign in to comment.