On This Page

AttachmentDownloadError

Class in Errors · JavaScript & TypeScript

Expected bounded attachment-download failure, without a URL, response body or credential

SDK-reported discovery and transport failures retain only a sanitized cause, with a safe transport code when available

class AttachmentDownloadError extends FluxerlyErrorclass AttachmentDownloadError
  extends FluxerlyError

Constructor#

Describe a download failure

Construction performs no request and does not release or retry a download

new AttachmentDownloadError(
    options: {
        readonly cause?: unknown
        readonly inputValidation?: InputValidationDetail | null
        readonly reason:
            | "input" | "network" | "timeout" | "busy" | "response"
            | "untrustedUrl" | "tooLarge"
        readonly status?: number | null
    }
): AttachmentDownloadErrornew AttachmentDownloadError(
  options: {
    readonly cause?: unknown
    readonly inputValidation?:
      | InputValidationDetail
      | null
    readonly reason:
      | "input" | "network"
      | "timeout" | "busy"
      | "response" | "untrustedUrl"
      | "tooLarge"
    readonly status?: number | null
  }
): AttachmentDownloadError

Parameters

options
cause optional

Underlying failure retained as the error's cause

unknown
inputValidation optional

Safe input explanation, not the rejected value

It is copied and frozen. Defaults to null

InputValidationDetail | null
reason

Failure category, as described on the reason field

| "input" | "network" | "timeout" | "busy" | "response"
| "untrustedUrl" | "tooLarge"| "input" | "network" | "timeout"
| "busy" | "response" | "untrustedUrl"
| "tooLarge"
status optional

HTTP status when a response was received

Defaults to null

number | null

Properties#

_tag#

Stable tag for identifying this expected failure

readonly _tag: "AttachmentDownloadError"

inputValidation#

SDK-owned local input detail, or null for non-input and unattributable failures

readonly inputValidation: InputValidationDetail | nullreadonly inputValidation:
  | InputValidationDetail | null

reason#

Local validation, untrusted attachment URL, local scheduler saturation, transport, response decoding, output limit or deadline

readonly reason:
    | "input" | "network" | "timeout" | "busy" | "response"
    | "untrustedUrl" | "tooLarge"readonly reason:
  | "input" | "network" | "timeout"
  | "busy" | "response"
  | "untrustedUrl" | "tooLarge"

status#

HTTP status when a response was received, otherwise null

readonly status: number | null

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON