update
This commit is contained in:
parent
d2ef9099a7
commit
7f40dfbf33
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue