---
url: "https://vueda.dev/v3/reference/api/js/use/useObject404/functions/useObject404.md"
title: "useObject404"
---

# useObject404

## Overview

A composable function for handling a 404 error on an ObjectInstance, given the props and model config, and updating
 a passed error ref.

## Signature

`useObject404(yourProps, yourInstanceObject, yourModelConfig, yourErrorRef)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-yourProps">yourProps</span> | `object` | yes | The props object. |
| <span id="param-yourInstanceObject">yourInstanceObject</span> | `ObjectInstance` | yes | The object instance. |
| <span id="param-yourModelConfig">yourModelConfig</span> | `object` | yes | The model config. |
| <span id="param-yourErrorRef">yourErrorRef</span> | `Ref` | yes | The error ref. |

#### yourProps Properties

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="param-yourProps-pk">pk</span> | `string` |  |  |  |

#### yourModelConfig Properties

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="param-yourModelConfig-app">app</span> | `string` |  |  | The app name being used. |
| <span id="param-yourModelConfig-clearError">clearError</span> | `() => void` |  |  | Clear the error. |
| <span id="param-yourModelConfig-config">config</span> | `object` |  |  | The model config. |
| <span id="param-yourModelConfig-effectScope">effectScope</span> | `object` |  |  | The effect scope for the instance. |
| <span id="param-yourModelConfig-error">error</span> | `Error` |  |  | The error that occurred while loading the model config. |
| <span id="param-yourModelConfig-errored">errored</span> | `boolean` |  |  | True if an error occurred while loading the model config. |
| <span id="param-yourModelConfig-info">info</span> | `object` |  |  | The model info. |
| <span id="param-yourModelConfig-loading">loading</span> | `boolean` |  |  | True if the model config is loading. |
| <span id="param-yourModelConfig-model">model</span> | `string` |  |  | The model name being used. |
| <span id="param-yourModelConfig-view">view</span> | `string` |  |  | The view being used, if any. |

### Returns

`void`

## Source

`client/lib/use/useObject404.js:21`
