Error Types
InternalServerError
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
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
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
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
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
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
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 | string, id: ID)
}
Extends
Members
constructor
method
type:
(entityName: keyof typeof coreEntitiesMap | string, id: ID) => EntityNotFoundError