Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP error: 403: Cannot send messages to this user #35

Closed
Qirel opened this issue Jun 2, 2020 · 1 comment
Closed

HTTP error: 403: Cannot send messages to this user #35

Qirel opened this issue Jun 2, 2020 · 1 comment

Comments

@Qirel
Copy link

Qirel commented Jun 2, 2020

I'm getting the following message,

Line 24 in [...]/vendor/laravel-notification-channels/discord/src/Exceptions/CouldNotSendNotification.php- Discord responded with an HTTP error: 403: Cannot send messages to this user

But I am unable to figure out how to catch this exception and handle it accordingly. The issue here is that the Discord bot no longer has any channels in common with that particular user, so its unable to send that PM - which makes sense.

How can I catch these exceptions from inside the Notification itself? It's sent to a few different users, not individually, so catching the Notification::send() method is not an option.

@Qirel Qirel closed this as completed Aug 19, 2020
@spinalwiz
Copy link

I think this is still an issue as if you are sending to multiple channels (e.g. 'mail' and 'database') then this exception will prevent it being sent to these other channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants