OptionalendpointPath of the Agents API request that failed, relative to the API host.
The same value as HttpError.endpoint and NetworkError.endpoint on the error itself.
OptionalmethodHTTP method of the request that failed, such as GET or POST.
OptionalsessionId of the Expressive (V4) session the failure happened on.
The same value onStreamCreated reported as StreamCreatedInfo.sessionId, and getSessionInfo() returns.
OptionalstreamId of the Talks (V2) or Clips (V3) stream the failure happened on.
The same value onStreamCreated reported as StreamCreatedInfo.streamId.
What the SDK knows about where a failure happened, beyond the error itself.
The second argument of onError. Which fields are set follows from the call that failed, not from the class of the error:
Nothing else is passed. In particular the request body and headers are not: the body is the end user's own message, and applications routinely forward this argument straight to an error reporter. The error is the thing to log — toJson() renders it with the same request fields already redacted — and this is context to attach alongside it.
Every field is optional, so read them with a guard — and the whole argument is optional too: a failure the SDK has no context for is reported with an empty object, or with no second argument at all.