Skip to main content

Error Handling

Default Behavior

By default, if an action fails the task keeps running. The failed action is skipped and the next one executes.

To change this, set config.continueOnError: false — the task will stop at the first failure.

Stop on First Error

[
{ "openNewTab": "https://example.com" },
{ "click": ".must-exist-button" },
{ "screenshot": "viewport" }
]

With config:

{
"actions": [...],
"config": { "continueOnError": false }
}

If .must-exist-button is not found, the task stops and returns:

{
"success": false,
"error": "Element '.must-exist-button' not found within 10000ms",
"actionIndex": 1
}
FieldDescription
actionIndexPosition of the action that failed (starts at 0)
errorWhat went wrong

Per-Action Override

You can override the global setting for a single action using options.continueOnError.

This is useful when one step is optional — let it fail silently while everything else still stops on error:

{
"actions": [
{ "openNewTab": "https://example.com" },
{ "click": ".optional-popup", "options": { "continueOnError": true, "timeout": 2000 } },
{ "click": "#required-button" },
{ "screenshot": "viewport" }
],
"config": { "continueOnError": false }
}

The popup click can fail without stopping the task. All other actions will stop on error.

Common Errors

ErrorCauseFix
Element "selector" not found within XmsElement doesn't exist or hasn't loaded yetIncrease timeout, check the selector, or add waitForElement before it
Element is not a SELECT elementUsed selectOption on the wrong elementMake sure the selector targets a <select> element
Iframe not foundThe iframe option selector doesn't matchCheck the iframe selector
Task timed outWorker didn't finish in timeIncrease the task timeout
Worker is offlineExtension disconnectedCheck the extension is running and connected
No available workersAll workers are busy or offlineWait and retry, or connect more workers
Daily task limit reachedFree plan: 50 tasks/dayUpgrade your plan or wait until tomorrow

Timeout Tips

Increase timeout for a slow element:

[
{ "waitForElement": ".dynamic-content", "options": { "timeout": 30000 } }
]

Wait for network activity to finish after navigation:

[
{ "openNewTab": "https://example.com" },
{ "waitForEvent": "networkIdle", "options": { "timeout": 15000 } },
{ "screenshot": "viewport" }
]

Add a short wait before checking for an element on a slow page:

[
{ "openNewTab": "https://example.com" },
{ "wait": 3000 },
{ "waitForElement": "#main-content" },
{ "screenshot": "viewport" }
]

HTTP Error Codes

CodeMeaning
400Bad request — invalid actions or missing fields
401Invalid or missing bearer token
403Feature not available on your plan
408Task timed out
409Worker busy, offline, or session mismatch
429Daily task limit reached