Skip to main content
Skip to main content

MedusaError

admin/discounts.internal.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 #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces
stackTraceLimitnumberRequired

Methods

captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

targetObjectobjectRequired
constructorOptFunction

Returns

void

voidvoid

Inherited from

Error.captureStackTrace

Was this section helpful?