1
Fork 0
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:
Steffo 2019-09-10 13:39:29 +02:00
parent 019d45456a
commit 4ceebc2b5f

View file

@ -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."""