For general information visit the parent repository
The fail return type is now the same as error, just with different purposes
Type | Description | Required Keys | Optional Keys |
---|---|---|---|
success | All went well, and (usually) some data was returned. | status, data | |
fail | There was a problem with the data submitted, or some pre-condition of the API call wasn't satisfied | status, message | code, data |
error | An error occurred in processing the request, i.e. an exception was thrown | status, message | code, data |
When an API call is rejected due to invalid data or call conditions. For example:
{
"status" : "fail",
"message" : "A title is required"
}
Required keys:
- status: Should always be set to "fail".
- message: A meaningful, end-user-readable (or at the least log-worthy) message, explaining what went wrong.
Optional keys:
- code: A numeric code corresponding to the error, if applicable
- data: A generic container for any other information about the fail, i.e. the conditions that caused the fail, wrong parameters, etc. If the reasons for failure correspond to POST values, the response object's keys SHOULD correspond to those POST values.
The JShip specification (this page) is covered under the same license as its parent project: modified BSD License