Skip to content
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

Streamline API return codes & output it as HTTP header #1277

Open
ozh opened this issue Apr 6, 2013 · 3 comments

Comments

@ozh
Copy link
Member

commented Apr 6, 2013

This is a COPY of Issue 1277: Streamline API return codes & output it as HTTP header, filed on Google Code before the project was moved on Github.

Please review the original issue and especially its comments. Comments here on closed issues will be ignored. Thanks.

Original description

Currently the API result arrays contain either 'statusCode', 'errorCode' or nothing.

- make it consistent: 'statusCode' and 'message' for all methods
- (in case a custom method doesn't implement that, output default status & message)
- use it as a HTTP header in the output

This might induce some breakage for people using API: make a detailed blog post about it
@LeoColomb

This comment has been minimized.

Copy link
Member

commented Feb 21, 2014

make it consistent: 'statusCode' and 'message' for all methods

👍

Par contre, pour respecter SemVer, up to 2.0.

@LeoColomb LeoColomb modified the milestones: 2.0, 1.8 Feb 21, 2014

@LeoColomb

This comment has been minimized.

Copy link
Member

commented Apr 25, 2014

@ozh Do we need to keep statusCode for an API answer? Because the status code is already accessible in HTTP headers, isn't it?

@ozh

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2014

statusCode and the HTTP header should be the same but yes, let's keep it: it makes it easier to check a status with a javascript script only, if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.