lsrestclient 3.0.0__tar.gz → 3.0.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/PKG-INFO +1 -1
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/exceptions.py +14 -14
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/pyproject.toml +1 -1
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/README.md +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/__init__.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/auth.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/client.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/contexts/__init__.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/contexts/bearer_token.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/fixtures.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/mock.py +0 -0
- {lsrestclient-3.0.0 → lsrestclient-3.0.1}/lsrestclient/response.py +0 -0
@@ -54,20 +54,20 @@ def raise_errors(r, exceptions: Optional[List[Type[Exception]]] = None):
|
|
54
54
|
else:
|
55
55
|
try:
|
56
56
|
json = r.json()
|
57
|
-
detail = pydash.get(json, "detail", json)
|
58
|
-
error_class = pydash.get(detail, "error_class", None)
|
59
|
-
if error_class is not None:
|
60
|
-
payload = pydash.get(detail, "error_payload", {})
|
61
|
-
else:
|
62
|
-
error_class = pydash.get(detail, "ERROR_CLASS", None)
|
63
|
-
payload = {}
|
64
|
-
|
65
|
-
if error_class in exceptions_by_class:
|
66
|
-
e = exceptions_by_class[error_class](**payload)
|
67
|
-
raise e
|
68
|
-
# backend errors
|
69
|
-
raise WebException(status_code=r.status_code, detail=detail)
|
70
|
-
|
71
57
|
except Exception as e:
|
72
58
|
log.error(r.content)
|
73
59
|
raise WebException(status_code=r.status_code, detail=r.content)
|
60
|
+
|
61
|
+
detail = pydash.get(json, "detail", json)
|
62
|
+
error_class = pydash.get(detail, "error_class", None)
|
63
|
+
if error_class is not None:
|
64
|
+
payload = pydash.get(detail, "error_payload", {})
|
65
|
+
else:
|
66
|
+
error_class = pydash.get(detail, "ERROR_CLASS", None)
|
67
|
+
payload = {}
|
68
|
+
|
69
|
+
if error_class in exceptions_by_class:
|
70
|
+
e = exceptions_by_class[error_class](**payload)
|
71
|
+
raise e
|
72
|
+
# backend errors
|
73
|
+
raise WebException(status_code=r.status_code, detail=detail)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|