diff --git a/src/posit/connect/errors.py b/src/posit/connect/errors.py index 3545fa66..e4997e1c 100644 --- a/src/posit/connect/errors.py +++ b/src/posit/connect/errors.py @@ -11,11 +11,19 @@ def __init__( http_message: str, payload: Any = None, ): - message = { - "error_code": error_code, - "error_message": error_message, - "http_status": http_status, - "http_message": http_message, - "payload": payload, - } - super().__init__(json.dumps(message)) + self.error_code = error_code + self.error_message = error_message + self.http_status = http_status + self.http_message = http_message + self.payload = payload + super().__init__( + json.dumps( + { + "error_code": error_code, + "error_message": error_message, + "http_status": http_status, + "http_message": http_message, + "payload": payload, + } + ) + )