我需要发送有关GRPC错误的丰富结构化错误详细信息。
我想可能是这样的:
fv = BadRequest.FieldViolation(field="login", description="Name is not unique") bad_request = BadRequest(field_violations=[fv]) context.abort(StatusCode.INVALID_ARGUMENT, bad_request.SerializeToString())
但是错误的,并以摘要错误文本发送字节。
我使用grpcio==1.17.1
我收到关于Github问题的反馈 https://github.com/grpc/grpc/issues/17601
一切都在1.18.0版本中工作