RuntimeError: JsonNull
app/models/kairos.rb:107:in `query'
raise j_body['errors'][0].to_s
app/controllers/v0/readings_controller.rb:12:in `index'
render json: Kairos.query(params)
...
(75 additional frame(s) were not displayed)
The problem is that if a component for a given sensor and device doesn't exist, the request is still passed to Kairos, which returns a 500 that percolates through to the user. Instead, we should return a 'sensible' empty response early.
Surfaced in this Sentry Issue: SC-API-15
The problem is that if a component for a given sensor and device doesn't exist, the request is still passed to Kairos, which returns a 500 that percolates through to the user. Instead, we should return a 'sensible' empty response early.