Skip to content

REQUEST - User Error Notification Handling

User notification exception handling is great for scenarios where the user initiates an action, but an issue occurs such as the network failing, data issues, etc. This middleware does the standard try/execute/catch/log & notify user that something went wrong

Usage

To use it on with your request handlers, simply configured the UserErrorNotifications section in your appsettings.json file:

{
"Mediator": {
"UserErrorNotifications": {
"My.Contracts.*": {
"*": {
"Title": "ERROR",
"Message" : "Failed to do something"
},
"fr-CA": {
"Title": "ERREUR",
"Message" : "Échec de faire quelque chose"
}
}
}
}
}