API reference
Errors
KymoscopeError codes and connection states.
KymoscopeError
error.code identifies the failure (it is also the message); error.detail carries context where there is some.
| Code | Cause |
|---|---|
no_columns | addColumns was given no columns. |
column_length_mismatch | addColumns columns have different lengths. |
bad_workspace | importWorkspace got a document without worksheets. detail.errors lists why. |
password_required | importWorkspace got an encrypted (.kymo) file without options.password. |
bad_file | Unreadable JSON, or importWorksheet/importChart got another type of file (detail.found). |
import_vetoed | beforeImport returned false. |
cancelled | An import was cancelled through its signal or chooseChannels returned null (ImportResult.cancelled). |
limit_reached | A limit refused the action; detail.reason is the LimitReason. A limit event is emitted too. |
not_found | Unknown dataset, worksheet, chart or series id (detail names which). |
wrong_password | live.connect with a password that does not match the stream, or importWorkspace with one that does not open the file. |
relay_unavailable | live.connect without live.relay configured. |
disposed | An operation on a disposed engine. |
invalid_argument | An unknown chart kind, settings of another kind, a series operation on a non-multi-band chart, removing the last worksheet, or laps on an out-of-core dataset (detail.reason). |
popup_blocked | The browser refused the window charts.openWindow() asked for (it was not called from a click, or pop-ups are blocked). |
export_failed | view.exportPng() had nothing to draw or the browser could not encode the image (detail.reason). |
Connection states
Live connections report connecting, live, stale (no data for 4 s) or error. After an unexpected close the SDK asks getToken again and reconnects every two seconds until you call live.disconnect.