Class in Errors · JavaScript & TypeScript
A send, reply or forward ended without confirming that Fluxer created the message
Inspect outcome before retrying, since unknown means message creation may already have occurred. Even not or rejected can follow preparatory file uploads and does not prove rollback. Metadata contains no Fluxer response body or message content. A missing-permission rejection lists the permissions that sending needs in details, as Api describes
class MessageError extends FluxerlyErrorclass MessageError
extends FluxerlyErrorConstructor#
Create a send failure from its reason and outcome, with optional status, retry wait, API detail, input detail and cause
new MessageError(
options: {
readonly apiError?: ApiErrorDetail | null
readonly cause?: unknown
readonly inputValidation?: InputValidationDetail | null
readonly outcome: OperationOutcome
readonly providerCode?: string | null
readonly reason:
| "input" | "network" | "timeout" | "rejected" | "busy"
| "response" | "rateLimit"
readonly responseField?: string | null
readonly retryAfterMs?: number | null
readonly status?: number | null
}
): MessageErrornew MessageError(
options: {
readonly apiError?:
| ApiErrorDetail | null
readonly cause?: unknown
readonly inputValidation?:
| InputValidationDetail
| null
readonly outcome:
OperationOutcome
readonly providerCode?:
| string | null
readonly reason:
| "input" | "network"
| "timeout" | "rejected"
| "busy" | "response"
| "rateLimit"
readonly responseField?:
| string | null
readonly retryAfterMs?:
| number | null
readonly status?: number | null
}
): MessageErrorParameters
options-
apioptionalError -
ApiErrorDetail | null causeoptional-
unknown inputoptionalValidation -
InputValidationDetail | null outcome-
OperationOutcome provideroptionalCode -
Unrecognized Fluxer error code, as in
OperationError Options string | null reason-
| "input" | "network" | "timeout" | "rejected" | "busy" | "response" | "rateLimit"| "input" | "network" | "timeout" | "rejected" | "busy" | "response" | "rateLimit" responseoptionalField -
Failed response field or check, as in
OperationError Options string | null retryoptionalAfter Ms -
number | null statusoptional-
number | null
Properties#
_tag#
Discriminator for identifying expected message-creation failures
readonly _tag: "MessageError"apiError #
Reviewed Fluxer rejection detail, or null when no safe classification is available
readonly apiError: ApiErrorDetail | nullreadonly apiError:
| ApiErrorDetail | nullinputValidation #
Safe local validation facts when the SDK can identify a failed input rule, otherwise null
readonly inputValidation: InputValidationDetail | nullreadonly inputValidation:
| InputValidationDetail | nulloutcome#
Whether the message may have been created, using the same vocabulary as other operation errors
The outcome not means no message creation request was sent, and rejected means Fluxer answered with a rejection. Neither is proof of rollback, and preparatory file uploads may already have occurred. The outcome unknown means the message may already have been created, so another send can duplicate it
readonly outcome: OperationOutcomereason#
Failure category, described by Operation
Busy also covers full local upload capacity, and a send never reports not
readonly reason:
| "input" | "network" | "timeout" | "rejected" | "busy"
| "response" | "rateLimit"readonly reason:
| "input" | "network" | "timeout"
| "rejected" | "busy"
| "response" | "rateLimit"retryAfterMs #
Server-required wait in milliseconds when usable, otherwise null
readonly retryAfterMs: number | nullreadonly retryAfterMs:
| number | nullstatus#
HTTP status when received, or null for local failures and missing responses
readonly status: number | nullInherited#
Inherited from Fluxerly: code, details, hint, to