post/2021-12-29-grpc-richer-error-handling/ #55
Replies: 1 comment 1 reply
-
|
是的,无论是 HTTP status code 还是 gRPC 的 error code,本质上是不适合比较复杂的业务逻辑的。这个时候我们就不得不使用自定义的错误模型了。其实感觉底层提供的 code 最好就简单一点,标明它是正常响应还是错误就可以了,不然自己还要把业务的错误一一映射过去感觉就有点削足适履的感觉了。(就像 Rust 中的 Result 一样) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
post/2021-12-29-grpc-richer-error-handling/
本文介绍 gRPC 基本错误处理和使用 goolge 扩展处理错误.
https://blog.cong.moe/post/2021-12-29-grpc-richer-error-handling/
Beta Was this translation helpful? Give feedback.
All reactions