Optionaloptions: { cause?: unknown }Plain-object form that survives postMessage/JSON.stringify.
StaticfromJSONRehydrates an error that crossed a serialization boundary.
Accepts SerializedAutogramError, legacy bridge envelopes
({ name, message, error: {...} }) and anything else (mapped to
unknown). Known codes are rehydrated to their concrete classes so
instanceof checks keep working within one bundle.
StaticisClassifies an error, optionally against a specific code.
Unlike instanceof, this also matches plain serialized error objects
and legacy error class names, so it is safe to use on errors received
from another execution context.
Optionalcode: AutogramErrorCode
Base class of all SDK errors.
Prefer AutogramError.is over
instanceof: it also recognizes errors that crossed a serialization boundary (plain{ name, code, message }objects) and errors from older SDK versions identified only by their class name.