Princeton-CDH / bluemountainsprings

A RESTful API to Blue Mountain
0 stars 2 forks source link

Error handling - 404 when id or api endpoint is not found #72

Open rlskoeser opened 7 years ago

rlskoeser commented 7 years ago

On my initial tests, API requests returned 500 errors when no data was loaded; it should have error handling throughout.

Any other API endpoints that reference ids should return 404s if the id is not found in the loaded data.

Any requested URL that doesn't match a valid API endpoint should return a 404.

rlskoeser commented 7 years ago

In some cases, I got empty non-error pages (200 OK) for what I think were invalid urls - that makes it harder to figure out what's going wrong when experimenting with the API. These kinds of urls should either return a 404 or redirect somewhere useful.

rlskoeser commented 7 years ago

Notes from my last round of testing after updates were made: