---
url: "https://vueda.dev/v3/reference/api/js/utils/fetchSupport/functions/readActionResponse.md"
title: "readActionResponse"
---

# readActionResponse

## Overview

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.

## Signature

`readActionResponse(response, options)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-response">response</span> | `Response` | yes | The response to classify. |
| <span id="param-options">options</span> | `object` | yes | The classification options. |

#### options Properties

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="param-options-bulk">bulk</span> | `boolean` |  |  | Whether this request targets the bulk path or detailed path.  Passed straight through to `ConfirmationRequiredError` so the renderer knows which warnings shape to expect back. |
| <span id="param-options-emptyStatuses">emptyStatuses</span> | `Set` |  |  | Success statuses whose body is not read back to the caller. |
| <span id="param-options-messagePrefix">messagePrefix</span> | `string` |  |  | The message used when the response is a plain failure. |
| <span id="param-options-successStatuses">successStatuses</span> | `Set` |  |  | Statuses that count as success. Defaults to every `response.ok`  status; pass a set to hold a handler to specific codes (delete accepts only 204, plus 200 during a dry run). |

### Returns

`Promise`

The decoded response data, or undefined for an empty status.

### Throws

- On a 400.
- On a 409.
- On any other unsuccessful status.

## Source

`client/lib/utils/fetchSupport.js:67`
