---
lang: en
title: 'API docs: rest.resthttperrors.invaliddata'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
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

**Signature:**

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  data | T |  |
|  name | string |  |
|  extraProperties | Props | _(Optional)_ |

**Returns:**

HttpErrors.HttpError &amp; Props


