When an incorrect driver type is specified in the appsettings, a generic KeyNotFound error is thrown, which can lead to confusion. Below is the result of the error:
To fix this, I replaced the usage of the collection in the .addMailer extension with a switch statement that throws a more descriptive exception.
When an incorrect driver type is specified in the appsettings, a generic KeyNotFound error is thrown, which can lead to confusion. Below is the result of the error:
To fix this, I replaced the usage of the collection in the .addMailer extension with a switch statement that throws a more descriptive exception.