tsoteen89 / cochlearProject

Website development for Cochlear
1 stars 0 forks source link

Consistent API Error Codes #191

Open James55 opened 10 years ago

James55 commented 10 years ago

We're likely going to need a consistent error scheme that the API returns whenever an error occurs. Some of the errors that can occur: Invalid ID (for example using "facilities/5/{token}", no facility exists with an id of 5 Nonexistent token Timed-out token Not privileged to access info (non-admin token in "facilities/alerts/{token}")

All I can think of right now, but add more if you can think of some.

James55 commented 10 years ago

Currently API returns: 100 - Stale Token (timed-out) 200 - Nonexistent token