Decision API Error Categories

This guide provides an overview of the various error codes you may encounter when using our Decision API, along with a description of the error and recommended actions.

The payload of the error response of the Decision API is a JSON-serialized grpc status. Therefore, if you want to know what the code in the response means, you can refer to this document: https://grpc.io/docs/guides/status-codes/. However, when an error occurs, our service returns the http status code matching the grpc code along with the error message. Therefore, you only need to look at the http status code and the message field in the payload.

{
  "code": 3, // Ignore
  "message": "page_id is empty",
  "details": [] // Ignore
}

Below is a table of HTTP error codes, their meanings, examples of errors, and how to mitigate them.

🚧

This is not a full list of error messages. If you have questions about an error message that is not documented in this list, please contact the Customer Engineering team.

HTTP StatusMeaningExample messagesMitigation
400 (Bad Request)A client sends a malformed request.no available valid identifier to construct Moloco advertising IDFill one of user identifiers:

- user.user_id
- device.persisent_id
- custom_id
inventory.search_query is emptyFill the inventory.search_query field for the request from a search inventory
page_id is emptyFill the page_id field for the request from a PAGE_VIEW inventory.
404 (Not found)A server can’t find the requested resource.inventory not foundCheck if there is a typo in the inventory ID.
Contact the Customer Engineering team otherwise.
429 (Too Many Request)Too many requests comes from the user.request denied by throttler, try again laterThis usually occurs if you have set the same identifier for all or a subset of users (anonymous aka non logged-in users). As a reminder, each user (logged-in or anonymous) should be assigned an unique identifier. For logged-in users, please fill an unique identifier in user_id. For anonymous users, please use device.persistent_id as described in this guide .
500 (Internal Server Error)Server can’t process requests by internal errors.This could occur transiently. If it occurs too frequently, please contact the Customer Engineering team.