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.
Error details
Additional details you wish to log
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.
The error message
This message will be logged to every log backend you have configured in your application.
MageError details