chore: refurish python code by applying Pylint linter rules (#8322)
This commit is contained in:
@@ -214,7 +214,7 @@ class Spider:
|
||||
return requests.delete(url, headers=headers, stream=stream)
|
||||
|
||||
def _handle_error(self, response, action):
|
||||
if response.status_code in [402, 409, 500]:
|
||||
if response.status_code in {402, 409, 500}:
|
||||
error_message = response.json().get("error", "Unknown error occurred")
|
||||
raise Exception(f"Failed to {action}. Status code: {response.status_code}. Error: {error_message}")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user