Error Types

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 } = {})
}

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 } = {})
}

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 } = {})
}

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()
}

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()
}

Members

constructor

method
type:
() => 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)
}

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)
}

Members

constructor

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

VerificationTokenError

Package: @vendure/core File: errors.ts

This error should be thrown when the verification token (used to verify a Customer’s email address) is either invalid or does not match any expected tokens.

Signature

class VerificationTokenError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => VerificationTokenError

VerificationTokenExpiredError

Package: @vendure/core File: errors.ts

This error should be thrown when the verification token (used to verify a Customer’s email address) is valid, but has expired according to the verificationTokenDuration setting in AuthOptions.

Signature

class VerificationTokenExpiredError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => VerificationTokenExpiredError

PasswordResetTokenError

Package: @vendure/core File: errors.ts

This error should be thrown when an error occurs trying to reset a Customer’s password.

Signature

class PasswordResetTokenError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => PasswordResetTokenError

PasswordResetTokenExpiredError

Package: @vendure/core File: errors.ts

This error should be thrown when an error occurs trying to reset a Customer’s password by reason of the token having expired.

Signature

class PasswordResetTokenExpiredError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => PasswordResetTokenExpiredError

IdentifierChangeTokenError

Package: @vendure/core File: errors.ts

This error should be thrown when an error occurs when attempting to update a User’s identifier (e.g. change email address).

Signature

class IdentifierChangeTokenError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => IdentifierChangeTokenError

IdentifierChangeTokenExpiredError

Package: @vendure/core File: errors.ts

This error should be thrown when an error occurs when attempting to update a User’s identifier (e.g. change email address) by reason of the token having expired.

Signature

class IdentifierChangeTokenExpiredError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => IdentifierChangeTokenExpiredError

NotVerifiedError

Package: @vendure/core File: errors.ts

This error should be thrown when the requireVerification in AuthOptions is set to true and an unverified user attempts to authenticate.

Signature

class NotVerifiedError extends I18nError {
  constructor()
}

Members

constructor

method
type:
() => NotVerifiedError

OrderItemsLimitError

Package: @vendure/core File: errors.ts

This error should be thrown when the number or OrderItems in an Order exceeds the limit specified by the orderItemsLimit setting in OrderOptions.

Signature

class OrderItemsLimitError extends I18nError {
  constructor(maxItems: number)
}

Members

constructor

method
type:
(maxItems: number) => OrderItemsLimitError

CouponCodeInvalidError

Package: @vendure/core File: errors.ts

This error is thrown when the coupon code is not associated with any active Promotion.

Signature

class CouponCodeInvalidError extends I18nError {
  constructor(couponCode: string)
}

Members

constructor

method
type:
(couponCode: string) => CouponCodeInvalidError

CouponCodeExpiredError

Package: @vendure/core File: errors.ts

This error is thrown when the coupon code is associated with a Promotion that has expired.

Signature

class CouponCodeExpiredError extends I18nError {
  constructor(couponCode: string)
}

Members

constructor

method
type:
(couponCode: string) => CouponCodeExpiredError

CouponCodeLimitError

Package: @vendure/core File: errors.ts

This error is thrown when the coupon code is associated with a Promotion that has expired.

Signature

class CouponCodeLimitError extends I18nError {
  constructor(limit: number)
}

Members

constructor

method
type:
(limit: number) => CouponCodeLimitError