Merge remote-tracking branch 'origin/main' into fix-mate20PageError
# Conflicts: # app/integrations/vendor_push.py
This commit is contained in:
@@ -543,7 +543,7 @@ def _send_honor_data(token: str, payload: dict[str, str]) -> dict[str, Any]:
|
||||
)
|
||||
code = data.get("code")
|
||||
if code is not None and int(code) != 200:
|
||||
raise VendorPushError(f"honor data push failed: {data}")
|
||||
raise VendorPushError(f"honor data push failed: {_raw_log_summary(data)}")
|
||||
return data
|
||||
|
||||
|
||||
@@ -639,7 +639,7 @@ def _send_huawei_data(token: str, payload: dict[str, str]) -> dict[str, Any]:
|
||||
},
|
||||
)
|
||||
if str(data.get("code", "")) != "80000000":
|
||||
raise VendorPushError(f"huawei data push failed: {data}")
|
||||
raise VendorPushError(f"huawei data push failed: {_raw_log_summary(data)}")
|
||||
return data
|
||||
|
||||
|
||||
@@ -808,9 +808,9 @@ def _send_xiaomi_data(token: str, payload: dict[str, str]) -> dict[str, Any]:
|
||||
)
|
||||
code = data.get("code")
|
||||
if code not in (0, "0", None):
|
||||
raise VendorPushError(f"xiaomi data push failed: {data}")
|
||||
raise VendorPushError(f"xiaomi data push failed: {_raw_log_summary(data)}")
|
||||
if str(data.get("result", "ok")).lower() not in ("ok", "success"):
|
||||
raise VendorPushError(f"xiaomi data push failed: {data}")
|
||||
raise VendorPushError(f"xiaomi data push failed: {_raw_log_summary(data)}")
|
||||
return data
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user