mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Add args to RoyalnetRequestError
This commit is contained in:
parent
019d45456a
commit
4ceebc2b5f
1 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,10 @@ class RoyalnetRequestError(Exception):
|
|||
def __init__(self, error: "ResponseError"):
|
||||
self.error: "ResponseError" = error
|
||||
|
||||
@property
|
||||
def args(self):
|
||||
return f"{self.error.name}", f"{self.error.description}", f"{self.error.extra_info}"
|
||||
|
||||
|
||||
class RoyalnetResponseError(Exception):
|
||||
"""The :py:class:`royalnet.network.Response` that was received is invalid."""
|
||||
|
|
Loading…
Reference in a new issue