-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Is it currently possible to distinguish between response errors and network errors in RPCC?
For example, with the DOM.getNodeForLocation method, it can sometimes return an error: No node found at given location. I don't really want to error out in all cases of this error, but for things like the RPCC websocket disconnecting, I would like to error out immediately.
Is there anyway to distinguish between these types of errors? Here's some (incorrect) psuedocode of what I'm trying to accomplish:
var args cdpcmd.DOMGetNodeForLocationArgs
if e := json.Unmarshal(req.Params, &args); e != nil {
return raw, e
}
reply, err := c.DOM.GetNodeForLocation(ctx, &args)
if err != nil {
if err.(*ResponseError) {
// handle differently
}
return raw, err
}
return json.Marshal(reply)Thanks!