Skip to main content
Skip to main content

MedusaError

Standardized error to be used across Medusa project.

Properties

codestring
dateDateRequired
messagestringRequired
namestringRequired
stackstring
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
prepareStackTrace(err: Error, stackTraces: CallSite[]) => any
Optional override for formatting stack traces
stackTraceLimitnumberRequired

Methods

captureStackTrace

Create .stack property on a target object

Parameters

targetObjectobjectRequired
constructorOptFunction

Returns

voidvoid
Was this section helpful?