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
paramsanyRequired
params
codestring
code of error

Properties

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