Errors
The "Common Errors Guide" offers a concise overview of typical errors encountered with the Blackbird AI API. It details each error, its causes, and solutions, helping developers quickly troubleshoot
This document provides guidance on common errors you might encounter while using the Blackbird AI API, along with potential solutions and troubleshooting steps.
Common Errors
1. Invalid Credentials
Error Message: 401 Unauthorized
Description: This error occurs when the credentials provided are incorrect or missing.
Solution:
Verify that the access token is included in the Authorization header of your request.
Verify that the access token hasn't expired. You can decode the access token JWT at https://jwt.io/, which will show the expiry. If it has expired:
Request a new access token using the appropriate OAuth flow.
Ensure your application handles token expiration and refreshes tokens as needed.
2. Missing or Invalid Input
Error Message: 400 Bad Request
Description: This error occurs when required input fields are missing or invalid.
Solution:
Check the API documentation to ensure all required fields are included in your request.
Validate the format of your input data. For example, URLs must be valid and properly formatted.
3. Rate Limit Exceeded
Error Message: 429 Too Many Requests
Description: This error indicates that you have exceeded the allowed number of requests within a given time frame.
Solution:
Implement exponential backoff and retry logic in your application.
Review your usage patterns and optimize your requests to stay within the rate limits.
4. Forbidden Access
Error Message: 403 Forbidden
Description: This error occurs when the user does not have permission to access the requested resource.
Solution:
- Ensure that your user account has the necessary permissions for the API endpoint you are trying to access.
5. Internal Server Error
Error Message: 500 Internal Server Error
Description: This error indicates an unexpected condition was encountered on the server.
Solution:
Retry the request after some time.
If the error persists, contact Blackbird AI support with details of the request and response.
6. Resource Not Found
Error Message: 404 Not Found
Description: This response occurs when the requested resource does not exist.
Solution:
Verify the endpoint URL and resource ID in your request.
Ensure that the resource you are trying to access has been created and is available.
Ensure that you are using the same user who created the resource
Troubleshooting Tips
Enable Logging: Implement logging in your application to capture request and response details for debugging.
Check API Documentation: Refer to the API documentation for detailed information on endpoints, request parameters, and expected responses.
Contact Support: If you encounter persistent issues, reach out to Blackbird AI support with detailed information about the error and your request.
By understanding these common errors and their solutions, you can effectively troubleshoot and resolve issues while using the Blackbird AI API.