When an error occurs, Trully APIs typically respond with a JSON error object that contains relevant information about the error.

{  
    "data": {  
        "error": "internal server error"  
    },  
    "version": "v1.0.0",  
    "status": "error",  
    "status_code": 500,  
    "request_date": "2023-11-24T14:20:50+0000",  
    "request": {  
        // Request data goes here.  
     }  
}

Handling Errors in Your Application

To handle errors effectively in your application:

  • Check the HTTP Status Code: Start by inspecting the HTTP status code in the response. This code will give you an initial indication of the outcome of the request.
  • Parse the Error Response: If an error occurs (e.g., status code 4xx or 5xx), parse the error response JSON to extract error details such as error_code and message.
  • Implement Retry Strategies: For certain types of errors, such as rate limiting (status code 429), you may want to implement retry mechanisms with exponential backoff to handle temporary issues.
  • Handle Authentication Errors: If you receive a 401 Unauthorized error, ensure that your application handles authentication errors gracefully and prompts the user to provide valid credentials.
  • Provide User-Friendly Feedback: Display user-friendly error messages to end-users based on the error details received from the API.
  • Monitor and Log Errors: Implement error monitoring and logging in your application to keep track of errors and diagnose issues promptly.

By following these best practices for error handling, you can build robust and reliable applications that interact seamlessly with Trully APIs while gracefully handling unexpected situations.

Need Assistance? Contact Our Support Team!

If you encounter any issues or have questions regarding the use of our system, please don't hesitate to reach out to the Trully Support Team. We are here to help you navigate any challenges and ensure a smooth experience with our services. Your satisfaction and success are our top priorities.

For support, please contact us at: [email protected]