lsrestclient 3.0.0__py3-none-any.whl → 3.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lsrestclient/exceptions.py +14 -14
- {lsrestclient-3.0.0.dist-info → lsrestclient-3.0.1.dist-info}/METADATA +1 -1
- {lsrestclient-3.0.0.dist-info → lsrestclient-3.0.1.dist-info}/RECORD +5 -5
- {lsrestclient-3.0.0.dist-info → lsrestclient-3.0.1.dist-info}/WHEEL +0 -0
- {lsrestclient-3.0.0.dist-info → lsrestclient-3.0.1.dist-info}/entry_points.txt +0 -0
lsrestclient/exceptions.py
CHANGED
@@ -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)
|
@@ -3,11 +3,11 @@ lsrestclient/auth.py,sha256=IC6niEht-xB_wC7da0HIeM05Ha785qhls-Q39P6dMHQ,467
|
|
3
3
|
lsrestclient/client.py,sha256=JWhf9foS-2RC0_LZz-DoXD6CE7T-o2J-DuAtDE6aaXc,11336
|
4
4
|
lsrestclient/contexts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
lsrestclient/contexts/bearer_token.py,sha256=GZZOzAI2Ng_9DvFCbhv1Wwb8wJ1AYCca3fQeNtt2NaU,753
|
6
|
-
lsrestclient/exceptions.py,sha256=
|
6
|
+
lsrestclient/exceptions.py,sha256=exJd1BfygNkkAqekmWepVXvXlMiOInVzPRnq7TmPURs,2149
|
7
7
|
lsrestclient/fixtures.py,sha256=dFkAYQXL6xqTOwRofb03Nsu_cIjq1sG10Rh8dxWfz9s,239
|
8
8
|
lsrestclient/mock.py,sha256=Ya12F0t5sXHTSt-X4jDDj5ILJx6y6QaBAMXutQMsIRI,1376
|
9
9
|
lsrestclient/response.py,sha256=zVisLH4TMG5Ww9gseLSb1rVpHUESoR03DNpL0bv1GCU,2165
|
10
|
-
lsrestclient-3.0.
|
11
|
-
lsrestclient-3.0.
|
12
|
-
lsrestclient-3.0.
|
13
|
-
lsrestclient-3.0.
|
10
|
+
lsrestclient-3.0.1.dist-info/METADATA,sha256=-b5iizfnj9RQQXa4HFIzhI_RpIEjy9z88CnIEACx4P4,6748
|
11
|
+
lsrestclient-3.0.1.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
12
|
+
lsrestclient-3.0.1.dist-info/entry_points.txt,sha256=7lN1XN3lq5Jv5PlpOdIlFrLlFlwzE5MaEWSgMhKASOM,47
|
13
|
+
lsrestclient-3.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|