Skip to content

[Bug]: Mailgun webhook occasionally returns incompatible country_code result #92

@krarey

Description

@krarey

What happened?

The country_code column in the mail_events table has type CHAR(2), but Mailgun will occasionally send the value 'Unknown' in the mapped event-data.geolocation.country field from its webhook call.

How to reproduce the bug

Observed from click event webhooks returned by Mailgun, the data.geolocation value received was {"city":"Unknown","country":"Unknown","region":"Unknown","timezone":"Unknown"}

Package Version

3.0.14

PHP Version

8.5.x

Laravel Version

13.4.0

Which operating systems does with happen with?

Linux

Notes

Not sure what the preferred fix would be, between additional validation/sanitization on the incoming webhook data or changing the column's datatype to something more flexible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions