From 500b3cea2bee251449aa41fcd83a1fef9e129bdb Mon Sep 17 00:00:00 2001 From: mike seibel Date: Tue, 25 Jun 2024 12:35:53 -0700 Subject: [PATCH] clear api exception --- panopto_client/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panopto_client/__init__.py b/panopto_client/__init__.py index 1312df6..32c1f48 100644 --- a/panopto_client/__init__.py +++ b/panopto_client/__init__.py @@ -159,8 +159,9 @@ def _request(self, methodName, params={}): return response except WebFault as err: self._log.exception(err) - raise PanoptoAPIException("Cannot connect to '{}': {}".format( - self._wsdl, err)) + raise PanoptoAPIException("{}".format( + err.fault.faultstring if ( + hasattr(err.fault, 'faultstring')) else err)) except Exception as err: self._log.error('Error: ({}) {}'.format( err, str(sys.exc_info()[0])))