The following error codes may be returned by the UPC Database API.
Before, errors were handled such as the following, with the error message and status code included with the main body of the response:
{ "message": "Product not found.", "status": 404, "error": true }
Now, the error parameter has been expanded to include information about the error, with a success parameter (true or false) indicating if the call succeeded or not.
{ "success": false, "error": { "code": 404, "message": "You have chosen an invalid endpoint. Try /history, /convert, or /latest" } }