-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make API responses consistent #71
Comments
In addition to the above, I believe all API responses should return a JSON object on success and error for consistency. There is a number of endpoints returning just a string "OK". |
Tagging this as a high priority bug, most endpoints are returning the db query as described above. The API must return a message that doesn't expose the queries. |
Status update on the items listed by Seth:
|
There are a few examples of inconsistent api responses.
We should do a look through and see if there are other similar inconsistencies, make a list here, and try to update them all at once. These could later be broken into separate issues if needed.
List:
/api/teams
200 get response is an array of objects, while/api/clients
200 get response is an object with aclients
property which is an array of objects"insert into \"team\" (\"bio\", \"hashtag\", \"name\") values ($1, $2, $3) returning *, ST_asGeoJSON(\"location\") as \"location\" - duplicate key value violates unique constraint \"team_hashtag_unique\""
we should say something more clear likeThe hashtag `hashtagname` is already taken
. (obvshashtag
will be replaced bytags
but this is just an example)The text was updated successfully, but these errors were encountered: