Skip to main content

Type Alias: NablaConnectErrorCode

NablaConnectErrorCode = "INVALID_ORIGIN" | "INVALID_MESSAGE" | "BUSY" | "TIMEOUT" | "COMMAND_REJECTED" | "CONTEXT_CHANGED" | "UNSUPPORTED_VERSION" | "DESTROYED" | "UNKNOWN"

The stable code of a NablaConnectError.

Remarks​

  • INVALID_ORIGIN: the url is not HTTPS (HTTP is allowed on localhost) or has an opaque origin.
  • INVALID_MESSAGE: the iframe could not read a command.
  • BUSY: another command is running, the iframe is changing state, or the provider is finishing the Nabla onboarding.
  • TIMEOUT: no answer in 30 seconds. For ready, no first state yet; the client keeps listening. For a command, reason is NO_RESULT and the outcome is unknown, the iframe may still run it. Read the state, do not assume failure.
  • COMMAND_REJECTED: the iframe refused or failed the command. See NablaConnectError.reason.
  • CONTEXT_CHANGED: another client was created on the same iframe, another document booted in it, or another origin loaded in it. Create a new client.
  • UNSUPPORTED_VERSION: the iframe and the SDK share no protocol version. Upgrade the SDK.
  • DESTROYED: destroy() was called.
  • UNKNOWN: the iframe sent something this SDK version does not know (upgrade the SDK), or an unexpected failure inside the SDK. See cause.