Skip to content

Commit 207824a

Browse files
committed
fire event in case of failure
1 parent 504e43f commit 207824a

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

src/Exceptions/CouldNotSendNotification.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/PusherChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace NotificationChannels\PusherPushNotifications;
44

5-
use NotificationChannels\PusherPushNotifications\Exceptions\CouldNotSendNotification;
5+
use Illuminate\Notifications\Events\NotificationFailed;
66
use Illuminate\Notifications\Notification;
77
use Pusher;
88

@@ -40,7 +40,7 @@ public function send($notifiable, Notification $notification)
4040
);
4141

4242
if (! in_array($response['status'], [200, 202])) {
43-
throw CouldNotSendNotification::pusherRespondedWithAnError($response);
43+
event(new NotificationFailed($notifiable, $notification, $response));
4444
}
4545
}
4646

0 commit comments

Comments
 (0)