MAPC / metrofuture-api

JSON API for the MAPC Project Database
0 stars 0 forks source link

API Call to Municipalities Returns "Unknown TIGER Release" #5

Closed mzagaja closed 7 years ago

mzagaja commented 7 years ago

After flushing the redis cache the API is failing to return results when it makes a GET request to municipalities:

2017-01-09T18:58:08.047009+00:00 app[web.1]: Started GET "/municipalities" for 104.207.192.42 at 2017-01-09 18:58:08 +0000
2017-01-09T18:58:09.250083+00:00 app[web.1]: Processing by API::V1::MunicipalitiesController#index as */*
2017-01-09T18:58:09.544292+00:00 heroku[router]: at=info method=GET path="/municipalities" host=api.projects.metrofuture.org request_id=9c7a6b02-14f4-4cec-9211-e25aa215dfb1 fwd="104.207.192.42" dyno=web.1 connect=0ms service=1496ms status=500 bytes=1760
2017-01-09T18:58:09.533077+00:00 app[web.1]: Completed 500 Internal Server Error in 283ms
2017-01-09T18:58:09.535115+00:00 app[web.1]:
2017-01-09T18:58:09.535117+00:00 app[web.1]: JSON::ParserError (784: unexpected token at '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2017-01-09T18:58:09.535118+00:00 app[web.1]: <title>404 Not Found</title>
2017-01-09T18:58:09.535119+00:00 app[web.1]: <h1>Not Found</h1>
2017-01-09T18:58:09.535119+00:00 app[web.1]: <p>Unknown TIGER release</p>
2017-01-09T18:58:09.535120+00:00 app[web.1]: '):
2017-01-09T18:58:09.535121+00:00 app[web.1]:   app/services/geojson_cacher.rb:8:in `live_value'
2017-01-09T18:58:09.535122+00:00 app[web.1]:   app/services/base_cacher.rb:54:in `internal_value'
2017-01-09T18:58:09.535123+00:00 app[web.1]:   app/services/base_cacher.rb:42:in `value'
2017-01-09T18:58:09.535123+00:00 app[web.1]:   app/models/municipality.rb:54:in `to_geojson'
2017-01-09T18:58:09.535124+00:00 app[web.1]:   app/resources/api/v1/municipality_resource.rb:14:in `geojson'

My guess/understanding is that this should return the geojson of the map that would appear on the front page. I need to figure out where it is coming from and why it is returning this. I would expect that the cache would simply repopulate.

mzagaja commented 7 years ago

This appears to be due to a breaking change to the census reporter API documented at https://github.com/censusreporter/census-api/commit/af1df2799cd80998e77bac900f552dface3f4736.