---
url: "https://vueda.dev/v3/reference/api/js/stores/storeModelChoices/ModelChoicesError/methods/constructor.md"
title: "constructor"
---

# constructor

## Overview

Creates an instance of ModelChoicesError.

## Signature

`constructor(messagePrefix, response, responseData)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-messagePrefix">messagePrefix</span> | `string` | yes | The prefix for the error message. |
| <span id="param-response">response</span> | `Response` | no | The response object associated with the error. |
| <span id="param-responseData">responseData</span> | `any` | no | The data returned in the response. |

### Returns

[ModelChoicesError](/v3/reference/api/js/stores/storeModelChoices/members/ModelChoicesError.md)

## Source

`client/lib/stores/storeModelChoices.js:25`
