Skip to main content
Version: v8.0.0

OptimisticRollbackArgs

Describes why the optimistic change has to be reverted.​

error

  • the request failed and it will not be retried or postponed anymore

abort

  • the request was aborted, response holds the abort error

removed

  • the request was removed from the dispatcher queue, there is no response to read

Import
import { OptimisticRollbackArgs } from "@hyper-fetch/core"

Preview​

type OptimisticRollbackArgs<Req> = { reason: (error | abort); request: Req; response: RequestResponseType<Req> } | { reason: removed; request: Req; response?: undefined };