Skip to content

utils/fetchSupport

Overview

Low-level fetch helper that decodes responses and wraps failures in typed errors.

Methods

  • actionRequestHeaders - Builds the headers every model-action request shares.
  • fetchHelper - Fetches a URL and returns the response.
  • getJsonOrText - Fetches a URL and returns the response.
  • readActionResponse - Classifies a model-action response the way every VUEDA action CRUD handler does: a 400 carries field errors, a 409 carries warnings the operator has not acknowledged, and anything else outside the success set is a fetch failure.

Types

CancellablePromise

future: webstorm doesn't understand import("@arrai-innovations/reactive-helpers/use/cancellableIntent.js").CancellablePromise so we are copying the type definition here

CancellablePromise = Promise & object

MaybeCancellablePromise

MaybeCancellablePromise = Promise & object

Source

client/lib/utils/fetchSupport.js:1

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2