Handling Errors
When the API returns an error, it will include three key pieces of information: an HTTP status code, an internal tracking code, and a human-readable message.
Error structure
Below are some simple examples of the general structure of an error response.
Request
{
"internal_code": null,
"message": "Unauthorized",
}
Note that these error messages are samples and are not indicative of the actual error messages returned by the API.
User-generated errors such as missing authentication headers or invalid parameters will not include an internal_code.
HTTP 500s will include an internal_code, and it can be submitted to the Spoonity support team for further investigation.
Localization
Error messages will be localized to a handful of supported languages. The language returned by the message will be based on the configured system language inside the Spoonity dashboard.