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.

CodeCause
no_columnsaddColumns was given no columns.
column_length_mismatchaddColumns columns have different lengths.
bad_workspaceimportWorkspace got a document without worksheets. detail.errors lists why.
password_requiredimportWorkspace got an encrypted (.kymo) file without options.password.
bad_fileUnreadable JSON, or importWorksheet/importChart got another type of file (detail.found).
import_vetoedbeforeImport returned false.
cancelledAn import was cancelled through its signal or chooseChannels returned null (ImportResult.cancelled).
limit_reachedA limit refused the action; detail.reason is the LimitReason. A limit event is emitted too.
not_foundUnknown dataset, worksheet, chart or series id (detail names which).
wrong_passwordlive.connect with a password that does not match the stream, or importWorkspace with one that does not open the file.
relay_unavailablelive.connect without live.relay configured.
disposedAn operation on a disposed engine.
invalid_argumentAn 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_blockedThe browser refused the window charts.openWindow() asked for (it was not called from a click, or pop-ups are blocked).
export_failedview.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.