Skip to content

Collecting breadcrumbs in notifications causes TypeError #973

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

Closed
parshikov opened this issue Jan 24, 2025 · 3 comments
Closed

Collecting breadcrumbs in notifications causes TypeError #973

parshikov opened this issue Jan 24, 2025 · 3 comments
Assignees

Comments

@parshikov
Copy link

How do you use Sentry?

Self-hosted / on-premises

SDK version

4.10.1

Laravel version

10.48

Steps to reproduce

  • Enable breadcrumbs.notifications in config
  • Send Laravel notification via facade like Notification::send('someidentificator', new SomeNotification()) (I send notification to messenger via channel name)

Expected result

No errors

Actual result

TypeError Sentry\Laravel\Features\NotificationsIntegration::formatNotifiable(): Argument #1 ($notifiable) must be of type object, string given, called in .../vendor/sentry/sentry-laravel/src/Sentry/Laravel/Features/NotificationsIntegration.php on line 72 during handling the NotificationSent event

@stayallive
Copy link
Collaborator

Interesting, I wasn't aware that was possible but looking closer at the code the notifiable can be anything, so I submitted #974 to fix this error.

@parshikov
Copy link
Author

parshikov commented Jan 24, 2025

@stayallive Yes. It can be anything that the notification channel class can work with. Thank you

@stayallive
Copy link
Collaborator

With 4.12.0 that was just released this should now be solved 🎉

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

No branches or pull requests

3 participants