Pyrrha-Platform / Pyrrha-Rules-Decision

The Pyrrha (created by Prometeo) solution application for determining thresholds in toxin exposure measured by the sensor device and sent to the cloud from the smartphone carried by the firefighters.
Apache License 2.0
6 stars 4 forks source link

get_status returning 500 instead of 404 #13

Closed narengan closed 4 years ago

narengan commented 4 years ago

John: When a firefighter id doesn't exist, abort 404 leads to an exception causing the code to send a 500 back

Marco: we are returning an html error page for 404 and 500 with the status code set. Does your code handle this when a firefighter doesnt exist?

JSegrave-IBM commented 4 years ago

I think Upkar fixed this on the call the other night by catching the 404 returns. So it should return 404 for any {firefighter_id, timestamp_mins} key that is not found and 500 for any other error. Just need to confirm if that's been committed - will check in on Slack as I don't seem to be getting email notifications from github.

@narengan @lidderupk