Usage of /kraken/channels/ 'status'

I’m a little confused regarding the usage of the ‘status’ field in /kraken/channels/.
I completely understand that it is used for both the title of the stream as well as the error code returned if something goes wrong. But the reason I’m confused is, why is it being used for both?
Sure it’s handy using 1 field for 2 things, but in my opinion the status field should only return a code, similar to how HTTP will return code 200 if all is good, 404 if not found and 403 forbidden.
Currently the ‘status’ field is a mix of both:
Case: ‘User doesn’t exist?’ => send status 404 (int)
Case: ‘User does exist?’ => send their stream title (string)
Case: ‘User does exist? (no title)’ => returns null
Also, why the return inconsistency?

This is regarding api v3 and v5.
Although I doubt there will be a change in regards to v3 as it would break many other applications to a degree.

I’ve noticed that status is used in both cases but never felt it to be an issue because for simple error checking I always look for a _id value before continuing.

Also, status as a “string” is for a title of a stream where a status as an integer is a status code.

But I can see where you are coming from and do think it should be considered as a change in v5.

The HTTP status code should be the primary error checking method, not the response body. For jsonp, checking the existence of the error field is the best way.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.