ylecuyer / survey-gizmo-ruby

Gem to use the Survey Gizmo API
MIT License
23 stars 26 forks source link

Bugged time in response block the fetch #106

Open ylecuyer opened 5 years ago

ylecuyer commented 5 years ago

Hi,

We had an occurence where the response has a bugged datetime :


  "result_ok": true,
  "data": {
    "id": "27726",
    "contact_id": "",
    "status": "Deleted",
    "is_test_data": "0",
    "date_submitted": "0000-00-00 00:00:00",
...

In this case, the middleware parser tries to parse this date but fails because it is invalid. The gem should return nil when this happens (for every possible datetime attributes)

For the moment, we marked the response as deleted so that we can filter it out from the results.