Open jeffkinnison opened 4 years ago
In terms of API purity, I think we should shy away from responding with an HTTP error code when the resource requested (i.e., the status) is perfectly retrievable.
Instead, the resource itself should contain the error/fail state of the search job. In this case, the status resources have a field called "status" to indicate this information.
Admittedly, documentation on what to expect in the "status" field is non-existent. If you agree with my thinking on avoiding the use of HTTP error codes when responding with status objects, I'll update the documentation to clarify what to expect in the "status" field.
Yeah, enumerating the possible status fields would certainly help.
Even though this may seem kind of weird, it would be helpful to find some way to distinguish error states by HTTP code, i.e. "Done" can be 200, a traceback can be some kind of 500, etc. This could be helpful for quickly spotting problems that arise in searches behind the scenes.