If a request fails for some reason (typically timeout), the reply will be retried by NServiceBus when it eventually arrives which leads to
InvalidOperationException with the message “No handlers could be found for message type”.
I’m trying to discard it by creating a custom recoverability policy which uses
RecoverabilityAction.Discard() if the exception is
InvalidOperationException and the message contains
"No handlers could be found for message type".
But that logic doesn’t seem to be called for the reply. Is my code incorrect, or can’t this scenario be handled by a custom policy?