ArgumentError: argument out of range
app/models/concerns/data_parser/storer.rb:44:in `timestamp_parse'
parsed_ts = Time.parse(timestamp)
app/models/concerns/data_parser/storer.rb:11:in `parse_reading'
parsed_ts = timestamp_parse(reading['recorded_at'])
app/models/storer.rb:7:in `initialize'
parsed_reading = Storer.parse_reading(@device, reading)
app/lib/mqtt_messages_handler.rb:52:in `new'
Storer.new(device, reading)
app/lib/mqtt_messages_handler.rb:52:in `block in handle_readings'
Storer.new(device, reading)
...
(54 additional frame(s) were not displayed)
This happens when a device passes an invalid timestamp (in this case 20-30-07-13T10:09:01Z). I was going to silently catch and warn on these, but it looks like our tests for the storer explicitly assert that we raise on invalid data. Is this desirable? I'm thinking perhaps that 'devices sending dodgy data' should be handled differently. CC @oscgonfer @pral2a
From Sentry Issue: SC-API-BZ
This happens when a device passes an invalid timestamp (in this case
20-30-07-13T10:09:01Z
). I was going to silently catch and warn on these, but it looks like our tests for the storer explicitly assert that we raise on invalid data. Is this desirable? I'm thinking perhaps that 'devices sending dodgy data' should be handled differently. CC @oscgonfer @pral2a