mailgun/mailgun-go

Issue parsing events with invalid user-variables

mvisonneau opened this issue · 0 comments

Doing a GET on the events API endpoint, the JSON output we get for some events may contain the following:

 "user-variables": "Could not load user-variables. They were either truncated or invalid JSON",

This ends up with the following results whilst using the SDK

while parsing event: failed to parse event 'accepted': parse error: expected { near offset 489 of 'Could not ...'

Would it be possible to soft-fail this scenario instead of not parsing the event entirely? 🤔