Selaa lähdekoodia

fix(api): attach pdns response to PDNSException

Peter Thomassen 5 vuotta sitten
vanhempi
commit
4853b17ce0
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      api/desecapi/exceptions.py

+ 1 - 0
api/desecapi/exceptions.py

@@ -24,6 +24,7 @@ class PDNSValidationError(ValidationError):
 
 class PDNSException(APIException):
     def __init__(self, response=None):
+        self.response = response
         return super().__init__(f'pdns response code: {response.status_code}, pdns response body: {response.text}')