-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Provide proper status codes for API operations #2187
Comments
100 % agree! Our status codes are very basic and not granular at the moment. If the status codes are changed we'll have to adapt the front end as well. Currently the check for a failed request looks like this |
@sebgie lol.. yes.. we would need to change that. I think Ember works with proper status codes though right? Might be worth checking. |
Hey there! I'd love to help out with this one... Is it assigned to anyone or can I take it? 😄 |
It is assigned to @javorszky at the moment but he has quite a few so may be happy to drop this one? @javorszky? |
Nope, I'll get on with this tonight. Finally moved in, so I can focus on Getting Things Done:tm: |
Oversights:
As a side product I uploaded a Ghost collection for Postman (https://gist.github.com/sebgie/7a44f4021bebbc078897). If there is interest I'll keep it updated. |
This is not true as of my PR #2732 - this enforces that the parameter (id, slug, key) is passed as part of the options object. However, it doesn't properly ignore what is in the body, so that's worth considering. |
@ErisDS yeah, I know that you took care of it 👍. I was thinking doing a PR for the 201 and 415 from the table and open new issues for the list at the bottom if thats okay for you? None of them are critical to the ember project I guess. It would be nice if they are done before we label the API v1.0. |
👍 |
closes TryGhost#2187 - added UnsupportedMediaTypeError (code: 415) - added status code 201 if a new object was created - Updated tests
@halfdan linked me http://tools.ietf.org/html/rfc2616. I was thinking whether it'd be a good idea / OCD / doing it right thing if we provided the proper status codes for API responses. Currently we're using 500, 404, 415, 413, 403, 401 and 200 (along with the 304 for caching).
The RFC allows for more granular bits, like
Thoughts?
The text was updated successfully, but these errors were encountered: