---
lang: en
title: 'API docs: rest.resthttperrors.invaliddata'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.resthttperrors.invaliddata.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RestHttpErrors](./rest.resthttperrors.md) &gt; [invalidData](./rest.resthttperrors.invaliddata.md)

## RestHttpErrors.invalidData() function

<b>Signature:</b>

```typescript
function invalidData<T, Props extends object = {}>(data: T, name: string, extraProperties?: Props): HttpErrors.HttpError & Props;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  data | <code>T</code> |  |
|  name | <code>string</code> |  |
|  extraProperties | <code>Props</code> |  |

<b>Returns:</b>

`HttpErrors.HttpError & Props`


