abersheeran / rpc.py

A fast and powerful RPC framework based on ASGI/WSGI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

可以定义客户端的错误提示吗

sylvoslee opened this issue · comments

目前客户端调用函数时,如果参数类型不对,提示如下:

httpx.HTTPStatusError: Server error '500 Internal Server Error' for url 'http://127.0.0.1:65432/sayhi'
For more information check: https://httpstatuses.com/500

错误提示可否像服务端一样明确一点:

pydantic.error_wrappers.ValidationError: 1 validation error for sayhi
name
  value is not a valid integer (type=type_error.integer)
commented

暂时没有这个功能。