Canonical envelope for thrown and callback-delivered Sheetwrite failures.
- Package
@sheetwrite/core/adapter
- Source
packages/core/src/errors.ts#L280
Members 7
constructor
constructor(code: SheetwriteErrorCodetype SheetwriteErrorCode = (typeof SHEETWRITE_ERROR_CODES)[number];type SheetwriteErrorCode = (typeof SHEETWRITE_ERROR_CODES)[number];type SheetwriteErrorCode =
(typeof SHEETWRITE_ERROR_CODES)[number];Exhaustive stable discriminator for consumer-visible Sheetwrite failures.API reference →, operation: SheetwriteErrorOperationtype SheetwriteErrorOperation =
(typeof SHEETWRITE_ERROR_OPERATIONS)[number];type SheetwriteErrorOperation =
(typeof SHEETWRITE_ERROR_OPERATIONS)[number];type SheetwriteErrorOperation =
(typeof SHEETWRITE_ERROR_OPERATIONS)[number];Exhaustive stable operation discriminator for consumer-visible failures.API reference →, message: string, options?: SheetwriteErrorOptionsinterface SheetwriteErrorOptions extends ErrorOptions {
context?: SheetwriteErrorContext;
retryable?: boolean;
}interface SheetwriteErrorOptions extends ErrorOptions {
context?: SheetwriteErrorContext;
retryable?: boolean;
}interface SheetwriteErrorOptions extends ErrorOptions {
context?: SheetwriteErrorContext;
retryable?: boolean;
}Optional cause, diagnostic context, and boundary-known retryability.API reference →);
code
code: "aborted" | "blocked" | "initialization-failed" | "initialization-required" | "datasource-request-failed" | "renderer-fallback" | "export-failed" | "xlsx-import-failed" | "optional-backend-unavailable" | "delimited-text-resource-limit" | "delimited-text-invalid-limit" | "xlsx-resource-limit" | "resource-limit" | "invalid-snapshot" | "not-found" | "commit-rejected" | "unavailable" | "quota" | "unsupported-schema" | "transaction" | "conflict" | "limit" | "invalid-limits" | "invalid-version" | "invalid-id" | "invalid-operations" | "operation-limit" | "payload-limit" | "response-id-mismatch" | "future-distance-limit" | "buffer-count-limit" | "buffer-operation-limit" | "buffer-byte-limit" | "pending-count-limit" | "pending-operation-limit" | "pending-byte-limit" | "late-echo" | "remote-operations-rejected" | "pending-capacity" | "presence-failed" | "revision-failed" | "comment-failed" | "sync-failed" | "sync-storage-failed" | "incomplete-data" | "xlsx-invalid-options" | "unsafe-hyperlink";
context
context?: Readonly<Record<string, SheetwriteErrorContextValuetype SheetwriteErrorContextValue =
| null
| string
| number
| boolean
| readonly SheetwriteErrorContextValue[]
| { readonly [key: string]: SheetwriteErrorContextValue };type SheetwriteErrorContextValue =
| null
| string
| number
| boolean
| readonly SheetwriteErrorContextValue[]
| { readonly [key: string]: SheetwriteErrorContextValue };type SheetwriteErrorContextValue =
| null
| string
| number
| boolean
| readonly SheetwriteErrorContextValue[]
| {
readonly [
key: string
]: SheetwriteErrorContextValue;
};JSON-safe values accepted in a public failure context.API reference →>> | undefined;
name
operation
operation: "initialize" | "create-grid" | "datasource-request" | "renderer-worker" | "export-xlsx" | "xlsx-import" | "xlsx-export" | "delimited-parse" | "delimited-import" | "delimited-encode" | "delimited-export" | "delimited-options" | "snapshot-validate" | "snapshot-allocate" | "persistence" | "pending-storage" | "synchronize" | "presence" | "revision" | "comments" | "query" | "hyperlink-activate";
retryable
retryable?: boolean | undefined;
toJSON
toJSON: () => SheetwriteErrorEnvelopeinterface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}interface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}interface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}Structural form preserved across realms and JSON serialization.API reference →
Declaration
View full TypeScript declaration
class SheetwriteError extends Error implements SheetwriteErrorEnvelopeinterface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}interface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}interface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}Structural form preserved across realms and JSON serialization.API reference → { code: SheetwriteErrorCodetype SheetwriteErrorCode = (typeof SHEETWRITE_ERROR_CODES)[number];type SheetwriteErrorCode = (typeof SHEETWRITE_ERROR_CODES)[number];type SheetwriteErrorCode =
(typeof SHEETWRITE_ERROR_CODES)[number];Exhaustive stable discriminator for consumer-visible Sheetwrite failures.API reference →, operation: SheetwriteErrorOperationtype SheetwriteErrorOperation =
(typeof SHEETWRITE_ERROR_OPERATIONS)[number];type SheetwriteErrorOperation =
(typeof SHEETWRITE_ERROR_OPERATIONS)[number];type SheetwriteErrorOperation =
(typeof SHEETWRITE_ERROR_OPERATIONS)[number];Exhaustive stable operation discriminator for consumer-visible failures.API reference →, options?: SheetwriteErrorOptionsinterface SheetwriteErrorOptions extends ErrorOptions {
context?: SheetwriteErrorContext;
retryable?: boolean;
}interface SheetwriteErrorOptions extends ErrorOptions {
context?: SheetwriteErrorContext;
retryable?: boolean;
}interface SheetwriteErrorOptions extends ErrorOptions {
context?: SheetwriteErrorContext;
retryable?: boolean;
}Optional cause, diagnostic context, and boundary-known retryability.API reference →, | "initialization-failed"
| "initialization-required"
| "datasource-request-failed"
| "optional-backend-unavailable"
| "delimited-text-resource-limit"
| "delimited-text-invalid-limit"
| "future-distance-limit"
| "buffer-operation-limit"
| "pending-operation-limit"
| "remote-operations-rejected"
context?: Readonly<Record<string, SheetwriteErrorContextValuetype SheetwriteErrorContextValue =
| null
| string
| number
| boolean
| readonly SheetwriteErrorContextValue[]
| { readonly [key: string]: SheetwriteErrorContextValue };type SheetwriteErrorContextValue =
| null
| string
| number
| boolean
| readonly SheetwriteErrorContextValue[]
| { readonly [key: string]: SheetwriteErrorContextValue };type SheetwriteErrorContextValue =
| null
| string
| number
| boolean
| readonly SheetwriteErrorContextValue[]
| {
readonly [
key: string
]: SheetwriteErrorContextValue;
};JSON-safe values accepted in a public failure context.API reference →>> | undefined; retryable?: boolean | undefined;
toJSON: () => SheetwriteErrorEnvelopeinterface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}interface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}interface SheetwriteErrorEnvelope {
readonly name: string;
readonly message: string;
readonly code: SheetwriteErrorCode;
readonly operation: SheetwriteErrorOperation;
readonly context?: SheetwriteErrorContext;
readonly retryable?: boolean;
}Structural form preserved across realms and JSON serialization.API reference →;