🚨 Announcing Vendure v2 Beta

Error Types

InternalServerError

Package: @vendure/core File: errors.ts

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

Signature

class InternalServerError extends I18nError {
  constructor(message: string, variables: { [key: string]: string | number } = {})
}

Extends

Members

constructor

method
type:
(message: string, variables: { [key: string]: string | number } = {}) => InternalServerError

UserInputError

Package: @vendure/core File: errors.ts

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

Signature

class UserInputError extends I18nError {
  constructor(message: string, variables: { [key: string]: string | number } = {})
}

Extends

Members

constructor

method
type:
(message: string, variables: { [key: string]: string | number } = {}) => UserInputError

IllegalOperationError

Package: @vendure/core File: errors.ts

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

Signature

class IllegalOperationError extends I18nError {
  constructor(message: string, variables: { [key: string]: string | number } = {})
}

Extends

Members

constructor

method
type:
(message: string, variables: { [key: string]: string | number } = {}) => IllegalOperationError

UnauthorizedError

Package: @vendure/core File: errors.ts

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

Signature

class UnauthorizedError extends I18nError {
  constructor()
}

Extends

Members

constructor

method
type:
() => UnauthorizedError

ForbiddenError

Package: @vendure/core File: errors.ts

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

Signature

class ForbiddenError extends I18nError {
  constructor(logLevel: LogLevel = LogLevel.Error)
}

Extends

Members

constructor

method
type:
(logLevel: LogLevel = LogLevel.Error) => ForbiddenError

ChannelNotFoundError

Package: @vendure/core File: errors.ts

This error should be thrown when a Channel cannot be found based on the provided channel token.

Signature

class ChannelNotFoundError extends I18nError {
  constructor(token: string)
}

Extends

Members

constructor

method
type:
(token: string) => ChannelNotFoundError

EntityNotFoundError

Package: @vendure/core File: errors.ts

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.

Signature

class EntityNotFoundError extends I18nError {
  constructor(entityName: keyof typeof coreEntitiesMap, id: ID)
  constructor(entityName: string, id: ID)
  constructor(entityName: keyof typeof coreEntitiesMap | string, id: ID)
}

Extends

Members

constructor

method
type:
(entityName: keyof typeof coreEntitiesMap, id: ID) => EntityNotFoundError

constructor

method
type:
(entityName: string, id: ID) => EntityNotFoundError

constructor

method
type:
(entityName: keyof typeof coreEntitiesMap | string, id: ID) => EntityNotFoundError