Skip to main content
Skip to main content

MedusaError

Standardized error to be used across Medusa project.

constructor

Creates a standardized error to be used across Medusa project.

Parameters

typestringRequired
type of error
messagestringRequired
message to go along with error
codestring
code of error
paramsanyRequired
params

Properties

codestring
dateDateRequired
messagestringRequired
typestringRequired
CodesobjectRequired
Codes.CART_INCOMPATIBLE_STATEstringRequired
Codes.INSUFFICIENT_INVENTORYstringRequired
TypesobjectRequired
Types.CONFLICTstringRequired
Types.DB_ERRORstringRequired
Errors stemming from the database
Types.DUPLICATE_ERRORstringRequired
Types.INVALID_ARGUMENTstringRequired
Types.INVALID_DATAstringRequired
Types.NOT_ALLOWEDstringRequired
Types.NOT_FOUNDstringRequired
Types.PAYMENT_AUTHORIZATION_ERRORstringRequired
Types.UNAUTHORIZEDstringRequired
Types.UNEXPECTED_STATEstringRequired
Was this section helpful?