MedusaError
Standardized error to be used across Medusa project.
constructor
Creates a standardized error to be used across Medusa project.
Parameters
type
stringRequiredtype of error
message
stringRequiredmessage to go along with error
params
anyRequiredparams
code
stringcode of error
Properties
type
stringRequiredmessage
stringRequireddate
DateRequiredTypes
objectRequired
Types
objectRequiredTypes.DB_ERROR
stringRequiredErrors stemming from the database
Types.DUPLICATE_ERROR
stringRequiredTypes.INVALID_ARGUMENT
stringRequiredTypes.INVALID_DATA
stringRequiredTypes.UNAUTHORIZED
stringRequiredTypes.NOT_FOUND
stringRequiredTypes.NOT_ALLOWED
stringRequiredTypes.UNEXPECTED_STATE
stringRequiredTypes.CONFLICT
stringRequiredTypes.PAYMENT_AUTHORIZATION_ERROR
stringRequiredCodes
objectRequired
Codes
objectRequiredCodes.INSUFFICIENT_INVENTORY
stringRequiredCodes.CART_INCOMPATIBLE_STATE
stringRequiredcode
stringWas this section helpful?