Skip to content

不规范的接口定义 #8

@fdkevin0

Description

@fdkevin0

以前的接口定义中已以rpc接口返回值作为json返回值中data,error中放置返回体中code/error、msg,使用中间件将code/error、msg写入返回体。
但是实际上这个形式是不可取的:

  • 请求返回值与文档不符合
  • grpc请求err会在传输时抛弃返回体,无法做到同时输出err与返回体
    根据以上原因,接口定义将会改为更标准形式,rpc err将只承载内部错误,而非返回体错误

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions