Class GuardedFetchError

A fetch that guardedFetch refused or could not finish.

Hierarchy

  • Error
    • GuardedFetchError

Constructors

Properties

Constructors

Properties

cause?: unknown

What the caller's host rule threw, when the refusal is that rule's failure; absent otherwise. The message keeps its details out, and so do Object.keys, JSON.stringify and a spread of the error: as on a native error, the property is not enumerable. Error serializers and util.inspect read it by name, as they read a native error's. Pino's default err serializer folds any cause with a string message, an error or a plain object, into the logged message, and the cause's stack, when it has one, into the logged stack. console.error prints any cause as [cause]. So a host that logs these errors decides what its rule throws.

Why the fetch stopped.

status?: number

The HTTP status of the answer that was refused, when there was one.