TappNetwork / filament-webhook-client

MIT License
5 stars 0 forks source link

[Bug]: json encoded Headers not parsed in infolist #3

Open willcastillo opened 2 weeks ago

willcastillo commented 2 weeks ago

What happened?

When receiving a webhook that has an incoming email payload from Sendgrid, the headers have a json encoded structured liek this: {"accept-encoding":["gzip"],"content-type":["multipart\/form-data; boundary=xYzZY"],"content-length":["11087"],"user-agent":["Sendlib\/1.0"],"host":["example.com"]}

When trying to "view" the webhook, I'm getting the following error: htmlspecialchars(): Argument #1 ($string) must be of type string, array given In: \vendor\filament\infolists\resources\views\components\key-value-entry.blade.php :42

How to reproduce the bug

Replace the content of any record in the webhook_calls table by:

{"accept-encoding":["gzip"],"content-type":["multipart\/form-data; boundary=xYzZY"],"content-length":["11087"],"user-agent":["Sendlib\/1.0"],"host":["example.com"]}

... and click on that record in the List Record page of the resource.

Package Version

Latest

PHP Version

8.2

Laravel Version

11

Which operating systems does with happen with?

No response

Notes

No response

andreia commented 2 weeks ago

@willcastillo Thank you for reporting! Added this PR https://github.com/TappNetwork/filament-webhook-client/pull/6 to fix it.