pokt-network / poktroll

The official Shannon upgrade implementation of the Pocket Network Protocol implemented using the Cosmos SDK
MIT License
16 stars 10 forks source link

[Code Health] Ensure all message/query handler return gRPC status errors #860

Open bryanchriswhite opened 1 month ago

bryanchriswhite commented 1 month ago

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

Olshansk commented 2 weeks ago

@bryanchriswhite Where are we on this?

bryanchriswhite commented 2 weeks ago

Not started but expected to be low effort. I intended to do this in parallel with a higher effort issue (like #543).