Options
All
  • Public
  • Public/Protected
  • All
Menu

MageError details

Hierarchy

  • IErrorDetails

Index

Properties

Properties

code

code: string

The error code

This code will generally be the code that will be returned to the client if this error is thrown during a user command request.

details

details: any

Error details

Additional details you wish to log

Optional level

level: "debug" | "warning" | "error" | "critical" | "alert" | "emergency"

The log level to use when logging this error (default: error)

Some types of errors are perfectly normal; for instance, a user failing to authenticate may throw an error, but you might not want to have it logged as an error.

Setting the level will allow you to decide whether this error should be ignored, considered benign, or serious.

message

message: string

The error message

This message will be logged to every log backend you have configured in your application.