PhantomWatson / muncie-events-api

MuncieEvents.com
https://muncieevents.com
2 stars 1 forks source link

Throw graceful error for malformed time or date strings #18

Closed PhantomWatson closed 5 years ago

PhantomWatson commented 5 years ago

Throw graceful errors for

PhantomWatson commented 5 years ago

Note: Errors were thrown recently because start_time was being passed as a datetime string. In the back end, time objects are constructed from the provided date string concatenated with the provided time string, so this caused redundant dates to be crammed into that constructor.

2019-04-08 14:50:45 Error: [Exception] DateTimeImmutable::__construct(): Failed to parse time string (4/15/19 2019-04-15T23:00:00.000Z) at position 8 (2): Double date specification