---
title: "Error Types"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="14" packageName="@vendure/core" />

This error should be thrown when some unexpected and exceptional case is encountered.

```ts title="Signature"
class InternalServerError extends I18nError {
    constructor(message: string, variables: { [key: string]: string | number } = {})
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(message: string, variables: { [key: string]: string | number } = {}) => InternalServerError`}   />




</div>
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="27" packageName="@vendure/core" />

This error should be thrown when user input is not as expected.

```ts title="Signature"
class UserInputError extends I18nError {
    constructor(message: string, variables: { [key: string]: string | number } = {})
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(message: string, variables: { [key: string]: string | number } = {}) => UserInputError`}   />




</div>
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="40" packageName="@vendure/core" />

This error should be thrown when an operation is attempted which is not allowed.

```ts title="Signature"
class IllegalOperationError extends I18nError {
    constructor(message: string, variables: { [key: string]: string | number } = {})
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(message: string, variables: { [key: string]: string | number } = {}) => IllegalOperationError`}   />




</div>
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="53" packageName="@vendure/core" />

This error should be thrown when the user's authentication credentials do not match.

```ts title="Signature"
class UnauthorizedError extends I18nError {
    constructor()
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`() => UnauthorizedError`}   />




</div>
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="67" packageName="@vendure/core" />

This error should be thrown when a user attempts to access a resource which is outside of
his or her privileges.

```ts title="Signature"
class ForbiddenError extends I18nError {
    constructor(logLevel: LogLevel = LogLevel.Warn)
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(logLevel: <a href='/reference/typescript-api/logger/log-level#loglevel'>LogLevel</a> = LogLevel.Warn) => ForbiddenError`}   />




</div>
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="81" packageName="@vendure/core" />

This error should be thrown when a <DocsLink href="/reference/typescript-api/entities/channel#channel">Channel</DocsLink> cannot be found based on the provided
channel token.

```ts title="Signature"
class ChannelNotFoundError extends I18nError {
    constructor(token: string)
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(token: string) => ChannelNotFoundError`}   />




</div>
<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="95" packageName="@vendure/core" />

This error should be thrown when an entity cannot be found in the database, i.e. no entity of
the given entityName (Product, User etc.) exists with the provided id.

```ts title="Signature"
class EntityNotFoundError extends I18nError {
    constructor(entityName: keyof typeof coreEntitiesMap | string, id: ID)
}
```
* Extends: <DocsLink href="/reference/typescript-api/errors/i18n-error#i18nerror">`I18nError`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(entityName: keyof typeof coreEntitiesMap | string, id: <a href='/reference/typescript-api/common/id#id'>ID</a>) => EntityNotFoundError`}   />




</div>
