codeforamerica / cfapi

The Code for America API. Tracks and motivates activity and participation across the civic technology movement.
http://codeforamerica.org/api
MIT License
113 stars 52 forks source link

When no results found, the CORS headers are not added to response #200

Open volkanunsal opened 9 years ago

volkanunsal commented 9 years ago

Good example is this url:

http://codeforamerica.org/api/projects?category=123

Not only does this return a 500 error in the console, the CORS headers are not added to the response either.

volkanunsal commented 9 years ago

I see that the actual parameter should be categories. But still, not returning CORS headers and throwing a 500 error is bad.

tmaybe commented 9 years ago

This stackoverflow comment seems to describe the issue, I'll see if I can figure out a solution that doesn't require a Flask extension.