Skip to main content

Exceptions Handling

GenAI Azure OpenAI Inference API - Troubleshooting

Should you encounter issues while interacting with the Azure OpenAI services via TrustNest APIM, this section provides guidance on identifying and resolving common problems.

1. Authentication Errors:

If you receive 401 Unauthorized error, check the following:

  • Ensure your TrustNest-Apim-Subscription-Key and Authorization token are correct.
  • Verify that your account has the necessary permissions to access the specified endpoints.
  • Make sure your token has not expired. If it has, generate a new token by going to your profile and clicking on "Regenerate" in the Subscriptions section.

2. Invalid Request Errors:

Receiving a 400 Bad Request error usually indicates a problem with the request's syntax or structure:

  • Verify that your request adheres to the correct format as outlined in the endpoint documentation.
  • Ensure all required parameters are included and are correctly formatted.

3. Rate Limit or Quota Exceeded Errors:

A 429 Too Many Requests error suggests that you've hit the rate limit for the API:

4. Internal Server Errors:

A 500 Internal Server Error suggests a problem on the server-side:

  • Verify that your JWT token is valid and has not expired. If it has, generate a new token.
  • Retry the request after a brief wait.
  • If the problem persists, check the Status Page for any ongoing incidents

5. Service Unavailable Errors:

A 503 Service Unavailable error suggests the service is temporarily unavailable:

  • Retry the request after a brief wait.
  • If the problem persists, check the Status Page for any ongoing incidents.

6. Content Filter Errors:

If your request triggers a content filter error 400 Content Filter Error, check the following:

7. Debugging:

  • Inspect the error message returned by the API as it often contains useful information about what went wrong.
  • Check the API documentation for the endpoint you are trying to use to ensure your request is structured correctly.

8. Getting Help:

  • Consult the OpenAI Error Handling Documentation for more detailed information on error codes.
  • If you are unable to resolve the issue, consider reaching out to Azure OpenAI support or TrustNest support for assistance.