zhoushuguang / beyond

Based on the go-zero framework of large-scale microservices practical project, see all say yes!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

http 自定义错误 应该返回多少错误给客户端呢?

Alan-MQ opened this issue · comments

image 比如这里 我在请求 register 的时候不小心写了verificationCode , 所以 http.parse 错误, 但是 code.Message 只返回了 INTERNAL_ERROR , 但是err中已经有很详细的 verification_code is not set 了 。 为什么不直接返回这个err.Error() 呢? 有什么讲究吗这里

看了第三节之后我懂了 www