Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per request, I have stripped down my last pull request to exclude any additional/unrelated refactoring.
There were several tests failing prior to my work. These tests will also fail in the automated build. They are unrelated to my work and should be ignored when evaluating my pull request.
This pull request contains modifications to enable extensibility through SendGrid API response handling. Previously, if a response from the SendGrid API indicated a result other than success (defined, by this extension, as status code >= 300), an exception would be thrown when the SendGridMessageAsyncCollector was flushed. This implementation made it difficult to react to responses in meaningful ways.
Additions
ISendGridResponseHandler - This interface can be implemented to allow business logic to be executed against responses from the SendGrid API.
DefaultSendGridResponseHandler - The default implementation for the interface above. If consumers of this extension do not implement and register the ISendGridResponseHandler with DI, then the DefaultSendGridResponseHandler will be used. This handler implements the logic that was previously implemented when SendGrid responses were received with status codes >= 300. The status code evaluation has been changed to >= 400, per SendGrid documentation.