Skip to content

Commit b6d3d3f

Browse files
committed
remove try block
1 parent 8366508 commit b6d3d3f

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

ayon_api/utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,8 @@ def raise_for_status(self, message=None):
182182
if message is None:
183183
message = str(exc)
184184

185-
data = {}
186-
try:
187-
data = self.data or data
188-
except (AttributeError, KeyError, RequestsJSONDecodeError):
189-
pass
190-
191185
submsg = ""
192-
if data:
186+
if self.data:
193187
submsg = json.dumps(data, indent=4)
194188

195189
self.log.warning(
@@ -199,7 +193,7 @@ def raise_for_status(self, message=None):
199193
submsg,
200194
)
201195

202-
detail = data.get("detail")
196+
detail = self.data.get("detail")
203197
if detail:
204198
message = f"{message} ({detail})"
205199
raise HTTPRequestError(message, exc.response)

0 commit comments

Comments
 (0)