CollectionFetchError

View as MarkdownOpen in Claude

Raised when an underlying REST fetch backing a paginated collection — for example Address.history or Address.textMessage — fails. The error carries the operation name and the underlying network/HTTP error so callers can decide whether to retry, surface a UI message, or fall back to a cached view.

Extends

  • Error

Constructors

Constructor

1new CollectionFetchError(operation, originalError): CollectionFetchError

Parameters

operation
stringRequired

Name of the collection-fetch operation that failed.

originalError
unknownRequired

Underlying error returned by the fetch.

Properties

operation
stringRequired

Name of the collection-fetch operation that failed.

originalError
unknownRequired

Underlying error returned by the fetch.

Examples

1import { CollectionFetchError } from '@signalwire/js';
2
3address.history$.subscribe({
4 next: (collection) => render(collection),
5 error: (err) => {
6 if (err instanceof CollectionFetchError) {
7 console.error(`history fetch (${err.operation}) failed:`, err.originalError);
8 }
9 },
10});