smartchicago / chicagoworksforyou

A citywide dashboard with ward-by-ward views of service delivery in Chicago. Includes complete API. Built using Chicago Open311 data.
http://www.chicagoworksforyou.com
MIT License
17 stars 6 forks source link

TTC endpoint balks on invalid service_code #293

Open cgansen opened 11 years ago

cgansen commented 11 years ago

http://localhost:5000/requests/time_to_close.json?end_date=2013-06-19&count=7&service_code=asdfasdf

2013/09/14 15:38:48 [cwfy ] [::1]:61512 localhost:5000/requests/time_to_close.json?end_date=2013-06-19&count=7&service_code=asdfasdf map[end_date:[2013-06-19] count:[7] service_code:[asdfasdf]]
2013/09/14 15:38:48 backend error: sql: Scan error on column index 0: converting string "<nil>" to a float64: strconv.ParseFloat: parsing "<nil>": invalid syntax
2013/09/14 15:38:48 [500] api error: backend error, retry your request later.
2013/09/14 15:38:48 [cwfy ] [::1]:61512 localhost:5000/requests/time_to_close.json?end_date=2013-06-19&count=7&service_code=asdfasdf completed in 3.180991ms