Skip to content

Commit

Permalink
Swallow specific ASB exception explicitly
Browse files Browse the repository at this point in the history
Co-authored-by: Indu Alagarsamy <[email protected]>
Co-authored-by: Sean Feldman <[email protected]>
  • Loading branch information
SeanFeldman and indualagarsamy committed Aug 23, 2019
1 parent dc59f27 commit 65aa41b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Transport/Receiving/MessagePump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ async Task ProcessMessage(Task<Message> receiveTask)
await receiver.SafeAbandonAsync(pushSettings.RequiredTransactionMode, lockToken).ConfigureAwait(false);
}
}
catch (Exception onErrorException) when (onErrorException is MessageLockLostException || onErrorException is ServiceBusTimeoutException)
{
logger.Debug("Failed to execute recoverability.", onErrorException);
}
catch (Exception onErrorException)
{
criticalError.Raise($"Failed to execute recoverability policy for message with native ID: `{message.MessageId}`", onErrorException);
Expand Down

0 comments on commit 65aa41b

Please sign in to comment.