Skip to content

Conversation

@xaka
Copy link
Contributor

@xaka xaka commented May 2, 2014

It's not very good to rely on error.message, which is string like Not Found, to handle specific errors, so it would be really nice to have an access to the actual HTTP status code.

That also means the documentation for REST API should be improved by adding information about available HTTP status codes for each API call and their meanings. For instance I expected http://api.quickblox.com/geodata/find.json to return an empty array even if nothing has been found, but in reality it responds with 404 Not Found.

It's not very good to rely on `error.message`, which is string like `Not Found`, to handle specific errors, so it would be really nice to have an access to the actual HTTP status code. That also means the documentation for `REST API` should also be improved by adding information about available HTTP status codes and their meanings.
anryogo pushed a commit that referenced this pull request Jun 4, 2014
Add HTTP status code as `code` to error object
@anryogo anryogo merged commit b65bba5 into QuickBlox:master Jun 4, 2014
@anryogo
Copy link
Contributor

anryogo commented Jun 4, 2014

|| For instance I expected http://api.quickblox.com/geodata/find.json to return an empty array even if nothing has been found, but in reality it responds with 404 Not Found.

Server-team have checked that on geodata and yes, it returns 404 error. But if we fix this, it will break backward compatibility.
So currently, we will leave this without changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants