Skip to content

Commit c988179

Browse files
Jeroenyfabpot
authored andcommitted
[Messenger] Add WrappedExceptionsInterface for nested exceptions
1 parent bd8ab90 commit c988179

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

EventListener/SendFailedMessageToNotifierListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public function onMessageFailed(WorkerMessageFailedEvent $event)
4242

4343
$throwable = $event->getThrowable();
4444
if ($throwable instanceof HandlerFailedException) {
45-
$throwable = $throwable->getNestedExceptions()[0];
45+
$exceptions = $throwable->getWrappedExceptions();
46+
$throwable = $exceptions[array_key_first($exceptions)];
4647
}
4748
$envelope = $event->getEnvelope();
4849
$notification = Notification::fromThrowable($throwable)->importance(Notification::IMPORTANCE_HIGH);

0 commit comments

Comments
 (0)