The “Errors” section of the API docs reads:
Here you can find the exhaustive list of Stuart API error responses, the expected format can be found below:
{
"error": "BAD_REQUEST",
"message": "job[dropoffs][0][package_type] is invalid"
}
While most routes do seem to return error messages in this format, the oauth/token
does not: instead of a message
field, oath token error responses have an error_description
field. For instance:
{
"error": "invalid_client",
"error_description": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}
Since I’m guessing “fixing” the error format for the oauth route might break existing clients, the inconsistency should, at the very least, be documented in the “errors” section of the API docs.
On that note - are there any other routes besides oauth/token
that don’t follow the “standard” error format (with a message
)?