Errors
When an RPC request fails, the server returns an error response whoseerror
object is a _tag-discriminated tagged error: _tag names the error class, and
message / data are optional supplemental fields.
_tag against that method’s union, so a
call surfaces only the errors that method can raise. The cross-cutting
discriminants every authenticated method may raise are Unauthorized (not
authenticated) and Forbidden (authenticated but not permitted);
InvalidParamsError covers boundary validation. Domain methods add their own
_tags (for example TaskRejected, ParticipantNotAdmitted,
ContactNotFound), listed on each method’s reference page.
Error handling
When you receive an error response:- Match on
error._tagto determine the error class. - Read the
messagefor a human-readable description. - Check
datafor additional context (if present). - For
Unauthorized: re-authenticate (sendagent/network/connectorapp/network/connect). - For
Forbidden: the principal is authenticated but lacks permission. - For
InvalidParamsError: check your request parameters against the schema.