-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling errors #50
Comments
Related: https://grpc.io/docs/guides/error/ |
Thanks. It does look like GRPC and protobuf has support for a fairly rich error system, including metadata. I don't think we'll have trouble implementing whatever we decide we need here - what I proposed/asked above is really quite straightforward. Having multiple error types should fit the bill - sort of like HTTP status codes, 404 not found ("I've never heard of this ID before)" vs. something like 301/302/307 ("the ID looks valid but the data lives elsewhere"). |
Here's a starting list (continuing to model on the HTTP codes, for now):
What am I missing? |
I ended up using these GRPC error codes, which I think make more sense than HTTP error codes. A few other questions have come up related to error handling during the implementation, including:
|
When a client queries a full node for a piece of data - say, a transaction receipt - there is a difference between the node thinking the ID of the data that was asked for is invalid (i.e., "this ID does not match any transaction I know of"), vs. the node thinking the ID is valid, but not having access to the data right now ("this transaction ID looks valid, but I may have pruned this data and no longer have it"). In the former case, the client can probably give up looking for the data; in the latter case, they could try asking someone else for it, or perhaps an archive node.
Do we want to attempt to distinguish between these cases in the API?
The text was updated successfully, but these errors were encountered: