DittoError is a subclass of the default Javascript Error. You can identify specific errors programatically using the code property.

Please reference ERROR_CODES for a comprehensive list of possible error codes in this SDK version.

Hierarchy

  • Error
    • DittoError

Properties

Properties

code: "internal" | "internal/unknown-error" | "sdk/unsupported" | "query/arguments-invalid" | "query/execution" | "query/invalid" | "query/unsupported" | "query/parameter" | "store/backend" | "store/crdt" | "store/document-not-found" | "store/attachment-file-permission-denied" | "store/attachment-file-not-found" | "store/attachment-not-found" | "store/attachment-token-invalid" | "store/failed-to-create-attachment" | "store/failed-to-fetch-attachment"

Use the error code to identify a specific error programatically.

See

ERROR_CODES for a comprehensive list of possible error codes in this SDK version.

context: Readonly<ErrorContext>

Additional data, which provides context to the error and may help with debugging.

Warning: The contents of this object may change in future versions of the SDK.

stack?: string

Some environments provide a stack trace that is attached to any error.