hammerlab / cycledash

Variant Caller Analysis Dashboard and Data Management System
Other
35 stars 2 forks source link

Show suggested routes for 404s on API routes #679

Closed ihodes closed 9 years ago

ihodes commented 9 years ago

Also remove the JSON 404 handler; this is handled for us by Flask.

Review on Reviewable

ihodes commented 9 years ago

e.g. we now get this

In [35]: req.post('http://localhost:5000/api/projectsasd', data={'name': 'whoa there'}, headers={'content-type': 'application/json'}).json()
Out[35]:
{u'message': u'Not Found. You have requested this URI [/api/projectsasd] but did you mean /api/projects or /api/projects/<int:project_id> ?',
 u'status': 404}
tavinathanson commented 9 years ago

Simple enough! Looks good to me.