@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
91 lines (45 loc) • 1.33 kB
Markdown
---
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) > [@loopback/rest](./rest.md) > [RestHttpErrors](./rest.resthttperrors.md) > [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
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
data
</td><td markdown="1">
T
</td><td markdown="1">
</td></tr>
<tr><td markdown="1">
name
</td><td markdown="1">
string
</td><td markdown="1">
</td></tr>
<tr><td markdown="1">
extraProperties
</td><td markdown="1">
Props
</td><td markdown="1">
_(Optional)_
</td></tr>
</tbody></table>
**Returns:**
HttpErrors.HttpError & Props