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

The JSON value is not in a supported DateTime format when searching for contacts #510

Closed
Jericho opened this issue Mar 21, 2024 · 1 comment
Assignees
Labels
Bug This change resolves a defect
Milestone

Comments

@Jericho
Copy link
Owner

Jericho commented Mar 21, 2024

StrongGrid is sometimes unable to parse the data returned by the api.sendgrid.com/v3/marketing/contacts endpoint because of the date format used for the created_at and updated_at fields but this problem is not consistent. Sometimes we are able to parse the data without any problems and sometimes it fails with the following exception: The JSON value is not in a supported DateTime format.

This is caused by the fact that the endpoint sometimes returns data such as this: "updated_at":"2024-03-21 16:21:30 +0000 UTC" rather than the expect standard format which looks like this: 2024-03-21T16:21:30Z. The System.Text.Json deserializer does not handle the custom format and therefore throws an exception when we attempt to parse the JSON data.

To be clear: I want to insist that this problem is not consistent because the endpoint does not consistently use this custom format. It appears that SendGrid intermittently switches between the expected format and the custom format.

@Jericho Jericho added the Bug This change resolves a defect label Mar 21, 2024
@Jericho Jericho added this to the 0.107.0 milestone Mar 21, 2024
@Jericho Jericho self-assigned this Mar 21, 2024
@Jericho
Copy link
Owner Author

Jericho commented Apr 18, 2024

🎉 This issue has been resolved in version 0.107.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This change resolves a defect
Projects
None yet
Development

No branches or pull requests

1 participant