***

title: "Error Types"
generated: true
---------------

## InternalServerError

<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: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## UserInputError

<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: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## IllegalOperationError

<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: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## UnauthorizedError

<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: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## ForbiddenError

<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: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## UnverifiedExternalEmailError

<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="84" packageName="@vendure/core" since="3.7.0" />

This error should be thrown when an external authentication attempt presents an email
address which already belongs to an existing account, but the external provider has not
verified that the authenticating user owns that email address. Linking in this situation
would allow account takeover, so it is refused.

```ts title="Signature"
class UnverifiedExternalEmailError extends I18nError {
    constructor()
}
```

* Extends: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## ChannelNotFoundError

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

This error should be thrown when a [Channel](/current/core/reference/typescript-api/entities/channel#channel) cannot be found based on the provided
channel token.

```ts title="Signature"
class ChannelNotFoundError extends I18nError {
    constructor(token: string)
}
```

* Extends: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
## EntityNotFoundError

<GenerationInfo sourceFile="packages/core/src/common/error/errors.ts" sourceLine="117" 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: [`I18nError`](/current/core/reference/typescript-api/errors/i18n-error#i18nerror)

<div className="members-wrapper">

</div>
