alphagov/spotlight — pull request #807 by jcbashdown (2014-09-29 16:38:16+00:00)
Title: Fix for 501 in pages requiring a dashboard list

Hi Ben!

While you were gone we changed the services, homepage, and webtraffic pages to use the stagecraft api client to get the dashboards.json (and fall back to the local config if this failed). This makes the logic around giving a 501 if there is no dashboard type somewhat weird but I didn't think hard enough about it to get rid of it which was dumb.

This change basically ignores this 501 and set's the status to 200 for any successful sync, thus fixing the 501 on the homepage. Perhaps this should be different in process_request.js (where the dashboard-type is a thing) or perhaps we should rethink the 501 altogether.

See this for the earlier changes:

https://github.com/alphagov/spotlight/pull/796