---
lang: en
title: 'API docs: rest.reject'
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.reject.html
---

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

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [Reject](./rest.reject.md)

## Reject type

Reject the request with an error.

<b>Signature:</b>

```typescript
export declare type Reject = (handlerContext: HandlerContext, err: Error) => void;
```
<b>References:</b> [HandlerContext](./express.handlercontext.md)


