From 4ceebc2b5f044d0786d40992ef4ce2a2d5e2afa2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 10 Sep 2019 13:39:29 +0200 Subject: [PATCH] Add args to RoyalnetRequestError --- royalnet/error.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/royalnet/error.py b/royalnet/error.py index 2a6a75e8..001965a0 100644 --- a/royalnet/error.py +++ b/royalnet/error.py @@ -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."""