Class in Errors · JavaScript & TypeScript
Expected failure of client
Reason input means the request object was invalid and nothing was sent, and reason busy means the client's local queue was full. Reason not means HTTP 404, and reason rejected means another non-2xx status, with the sanitized Fluxer error in api. Reason rate means a required wait would pass the deadline or could not be completed. Reasons network, timeout and response describe transport failures, the deadline and unusable success bodies. Check outcome before repeating a write. Default API calls return it in an Err and Effect calls fail with it. Errors never include the path, query, body, headers or response body
class RestRequestError extends FluxerlyErrorclass RestRequestError
extends FluxerlyErrorConstructor#
Create the failure from its operation, reason and outcome, with optional status, retry wait, API detail, input detail and cause
new RestRequestError(
options: OperationErrorOptions<"rest.request">
): RestRequestErrornew RestRequestError(
options: OperationErrorOptions<
"rest.request"
>
): RestRequestErrorParameters
options-
OperationErrorOptions<"rest.request">
Properties#
_tag#
Stable expected-failure discriminator
readonly _tag: "RestRequestError"apiError #
Safe classification of why Fluxer rejected the request, or null when the response could not be classified
readonly apiError: ApiErrorDetail | nullreadonly apiError:
| ApiErrorDetail | nullinputValidation #
Safe explanation of the locally invalid request field, or null when the failure was not an input failure
readonly inputValidation: InputValidationDetail | nullreadonly inputValidation:
| InputValidationDetail | nulloperation#
Requested operation, always rest
readonly operation: "rest.request"outcome#
Whether the request may have reached Fluxer, described by Operation
readonly outcome: OperationOutcomereason#
Failure category, described by Operation
readonly reason: OperationReasonretryAfterMs #
Usable server-required retry wait in milliseconds, otherwise null
readonly retryAfterMs: number | nullreadonly retryAfterMs:
| number | nullstatus#
HTTP status when a response was received, otherwise null
readonly status: number | nullInherited#
Inherited from Fluxerly: code, details, hint, to