On This Page

WebhookOperationError

Class in Errors · JavaScript & TypeScript

An expected failure while managing a webhook or one of its messages

Use reason to distinguish invalid input, an unavailable service or a rejected request, and outcome before deciding whether to retry a write. If the outcome is unknown, Fluxer may already have made the change. When possible, fetch the current state before trying again. Error details exclude secret-bearing URLs, raw response bodies and the submitted values. A missing-permission rejection lists the permissions that the operation needs in details.requiredPermissions when the SDK knows them, as ApiErrorDetail describes

class WebhookOperationError extends FluxerlyErrorclass WebhookOperationError
  extends FluxerlyError

Constructor#

Create the failure from its operation, reason and outcome, with optional status, retry wait, API detail, input detail and cause

new WebhookOperationError(
    options: OperationErrorOptions<WebhookOperation>
): WebhookOperationErrornew WebhookOperationError(
  options: OperationErrorOptions<
    WebhookOperation
  >
): WebhookOperationError

Parameters

Properties#

_tag#

Identifies this error in a switch or another tagged-error check

readonly _tag: "WebhookOperationError"

apiError#

Recognized explanation of Fluxer's rejection, without raw response data, or null when unavailable

readonly apiError: ApiErrorDetail | nullreadonly apiError:
  | ApiErrorDetail | null

inputValidation#

Safe explanation of the locally invalid property, or null when no input problem could be identified

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

operation#

Webhook action the application attempted

readonly operation: WebhookOperation

outcome#

Whether the request may have reached Fluxer, described by OperationOutcome

readonly outcome: OperationOutcome

reason#

Failure category, described by OperationReason

The reason notFound may indicate an invalid token, not just a missing webhook

readonly reason: OperationReason

retryAfterMs#

Delay requested by Fluxer before retrying, in milliseconds, or null when unavailable

readonly retryAfterMs: number | nullreadonly retryAfterMs:
  | number | null

status#

HTTP response status when one was received, or null when it is unavailable

readonly status: number | null

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON