mirror of
https://github.com/chaitin/SafeLine.git
synced 2026-01-31 13:53:33 +08:00
fix: check slce response data status code
This commit is contained in:
@@ -5,7 +5,7 @@ import json
|
||||
|
||||
def get_response_data(response: httpx.Response) -> dict:
|
||||
if response.status_code != 200:
|
||||
return f"response status code: {response.status_code}"
|
||||
raise Exception(f"response status code: {response.status_code}")
|
||||
|
||||
data = response.json()
|
||||
if data["msg"] is not None and data["msg"] != "":
|
||||
|
||||
Reference in New Issue
Block a user