Skip to content

Commit a4878ac

Browse files
authored
Adding common problems to README
1 parent 4655c05 commit a4878ac

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,24 @@ More information about the SMS Attributes can be found on the [AWS SNS Docs](htt
130130
It's important to know that the attributes set on the message will override the
131131
default ones configured in your AWS account.
132132

133+
## Exception handling
134+
Exceptions are not thrown by the package in order to give other channels a chance to work properly. Instead, a `Illuminate\Notifications\Events\NotificationFailed` event is dispatched. For debugging purposes you may listen to this event in the `boot` method of `EventServiceProvider.php`.
135+
136+
```php
137+
Event::listen(function (\Illuminate\Notifications\Events\NotificationFailed $event) {
138+
//Dump and die
139+
dd($event);
140+
141+
//or log the event
142+
Log::error('SNS error', $event->data)
143+
});
144+
```
145+
146+
## Laravel Vapor
147+
By default [Laravel Vapor](https://vapor.laravel.com/) creates a role `laravel-vapor-role` in AWS which does not have permission to send SMS via SNS. This results in SMS being sent successfully in local but will not be sent on a Vapor environment. Note that no exception will be thrown as described above.
148+
149+
In the AWS console, navigate to Identity and Access Management (IAM) and click on roles. Select `laravel-vapor-role` then add the `AmazonSNSFullAccess` policy to enable sending in Vapor.
150+
133151
## Changelog
134152

135153
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

0 commit comments

Comments
 (0)