This commit is contained in:
buua436 2025-12-15 13:36:21 +08:00
parent d2ef9099a7
commit 7f40dfbf33

View file

@ -527,7 +527,7 @@ async def webhook(agent_id: str):
# float # float
try: try:
return float(v) return float(v)
except: except Exception:
raise Exception(f"Cannot convert '{value}' to number") raise Exception(f"Cannot convert '{value}' to number")
# Object # Object
@ -538,7 +538,7 @@ async def webhook(agent_id: str):
return parsed return parsed
else: else:
raise Exception("JSON is not an object") raise Exception("JSON is not an object")
except: except Exception:
raise Exception(f"Cannot convert '{value}' to object") raise Exception(f"Cannot convert '{value}' to object")
# Array <T> # Array <T>
@ -549,7 +549,7 @@ async def webhook(agent_id: str):
return parsed return parsed
else: else:
raise Exception("JSON is not an array") raise Exception("JSON is not an array")
except: except Exception:
raise Exception(f"Cannot convert '{value}' to array") raise Exception(f"Cannot convert '{value}' to array")
# String (accept original) # String (accept original)