All BAP errors follow JSON-RPC 2.0 error format with extended data providing recovery guidance for agents.
Numeric error code from the table below.
Human-readable error message.
Whether the operation can be retried.
Suggested delay before retrying (milliseconds).
Additional context (selector used, page ID, etc.).
Actionable suggestion for the agent on how to recover from the error.
Error Code Reference
JSON-RPC Standard Errors
Server State Errors
Browser Errors
Element Errors
Navigation and Action Errors
Security and Approval Errors
Error Handling Patterns
Retry with Backoff
For retryable errors, use the retryAfterMs hint:
Observe-Retry Pattern
The most common recovery pattern for element errors is to re-observe and retry:
Structured Error Classes
Both SDKs provide typed error classes for precise error handling: