When integrating with the Forestreet API, understanding and effectively handling error codes is crucial for maintaining a smooth user experience and ensuring the reliability of your system. In this guide, we’ll discuss common errors that you might encounter while using our API.

Error response

{
    "code": "MARKET_NOT_FOUND",
    "message": "Please provide a market id."
}

Error codes

MARKET_NOT_FOUND

The MARKET_NOT_FOUND error occurs when the API is unable to locate the specified market in its database. This error typically arises when an invalid market identifier is used in a request. To resolve this, ensure that the market identifier provided is correct and corresponds to one of the available markets in our system. It’s also advisable to verify that the market is currently active and accessible through the API.

PROJECT_NOT_CREATED

The PROJECT_NOT_CREATED error indicates a failure in the project creation process. This can happen due to various reasons, such as missing or invalid data in the request, or limitations set within the API (e.g., quota limits or restricted permissions). To troubleshoot this error, check that all required fields in the project creation request are correctly filled out and that your account has the necessary permissions and quota availability to create a new project.

INTERNAL_SERVER_ERROR

The INTERNAL_SERVER_ERROR is a generic error code that signifies an unexpected condition encountered by the server, which prevented it from fulfilling the request. This error is typically on the server-side, meaning the issue is not with your request but with the API’s internal processing. In such cases, it’s advisable to retry the request after a short interval. If the error persists, it’s recommended to contact the API support team for assistance, as this might indicate a more significant issue with the API infrastructure.