---
meta:
 - name: keywords
   description: api typescript node.js documentation withErrorMsg function
---
# withErrorMsg - @tsed/schema

## Usage

```typescript
import { withErrorMsg } from "@tsed/schema";
```

> See [/packages/specs/schema/src/utils/withErrorMsg.ts](https://github.com/tsedio/tsed/blob/v8.27.0/packages/specs/schema/src/utils/withErrorMsg.ts#L0-L0).

## Overview

```ts
function withErrorMsg<Decorator extends (...args: any[]) => any>(errorKey: string, originalDecorator: Decorator): ErrorChainedDecorator<Decorator>;
```
