mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-29 17:27:41 +00:00
♿ improve actionfailed info
This commit is contained in:
@ -176,7 +176,7 @@ def _handle_api_result(result: Optional[Dict[str, Any]]) -> Any:
|
||||
"""
|
||||
if isinstance(result, dict):
|
||||
if result.get("status") == "failed":
|
||||
raise ActionFailed(retcode=result.get("retcode"))
|
||||
raise ActionFailed(**result)
|
||||
return result.get("data")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user