Consistently encapsulate gRPC errors in gRPC status.Error() with appropriate status codes.
Origin Document
Observations made while working on #612.
While we already often wrap errors in custom cosmos-sdk error types, we SHOULD also be wrapping any of those errors which find their way back to a gRPC client in a gRPC status error. See: google.golang.org/grpc/status.
Goals
Align with best practices.
Improve gRPC client expectations and UX.
Improve consistency.
Deliverables
[ ] A PR for each module which:
[ ] wraps any non-status errors in all gRPC message/query handlers in an appropriately coded* gRPC status error.
[ ] updates status codes on existing status errors for which there is a more appropriate code*.
Objective
Consistently encapsulate gRPC errors in gRPC
status.Error()
with appropriate status codes.Origin Document
Observations made while working on #612.
While we already often wrap errors in custom cosmos-sdk error types, we SHOULD also be wrapping any of those errors which find their way back to a gRPC client in a gRPC status error. See: google.golang.org/grpc/status.
Goals
Deliverables
*(see: codes.Code)
Non-goals / Non-deliverables
General deliverables
Creator: @bryanchriswhite