Error handling guidelines
Recommended client behavior:
- Treat transport errors, HTTP errors and command failures separately.
- For
POST /execute, a successful HTTP response only means the command was accepted into the queue. - Always poll the command until
doneorfailed. - For batch results, inspect each item in
response.commands. - Handle
offloaded_data_urlwherever large outputs are possible. - Clean up sessions in
finallyblocks so orphaned sessions do not keep billing.
Common failure sources:
- invalid command parameters
- unsupported proxy country or city
- session expiration or user-initiated stop while a command is pending
- large responses being offloaded rather than returned inline