error in place of result. error.data.kind names the kind: branch on it, never on the message text. retryable says whether sending the same command again can succeed.
| Kind | Code | Retryable | Python exception |
|---|---|---|---|
UnknownOp | -32601 | No | UnsupportedError |
InvalidArgs | -32602 | No | InvalidArgsError |
Internal | -32603 | No | HalyardError |
NoAllocation | -32001 | No | NotConnectedError |
NotConnected | -32002 | No | NotConnectedError |
DeviceOffline | -32004 | Yes | NotConnectedError |
Timeout | -32006 | Yes | TimeoutError |
Unauthorized | -32007 | No | UnauthorizedError |
Canceled | -32008 | No | HalyardError |
ActionTimeout | -32009 | No | TimeoutError |
StrategyUnavailable | -32010 | No | UnsupportedError |
TreeUnavailable | -32011 | No | TreeUnavailableError |
StaleNode | -32012 | No | StaleNodeError |
TargetNotFound | -32013 | No | TargetNotFoundError |
NavigationFailed | -32014 | No | NavigationError |
EventsExpired | -32015 | No | HalyardError |
DialogOpen | -32016 | No | DialogOpenError |
Conflict | -32017 | No | ConflictError |
Page.evaluate, Locator.evaluate or Page.waitForFunction is not a DCP error: the command succeeds with exception in its result, and the Python SDK raises EvaluationError.