- Platform API errors occur when communicating with the Agent Stack server (authentication, network issues, invalid responses).
- Agent task errors occur when agents fail or reject tasks during execution.
Platform API errors
All API methods returnApiResult<T>. You can branch on result.ok or use unwrapResult and catch errors.
Error helpers
Use the guard helpers to match specific error types.A2A extension errors
When tasks fail or are rejected, agents can emit an error extension payload. Read it withextractUiExtensionData and display a user facing message.