Mixedbread

Error Handling

Learn how to handle potential errors when using the Mixedbread API SDKs for Python and TypeScript. Catch specific errors like authentication, permissions, rate limits, and server issues.

Working With The SDKs

Our SDKs provide a great way for developers to interact with the Mixedbread API. In this section we will look at how to handle errors properly to ensure a good developer experience.

Best Practices

  • Catch Specific Errors First: Always try to catch the most specific error types before falling back to the base Exception/Error.
  • Implement Retries: For transient errors like RateLimitError and InternalServerError try to change the max retries in the Mixedbread class.
  • Log Errors: Log detailed error information (including timestamps, response details and the full error message/stack trace) to help with debugging.
  • Graceful Degradation: Design your application to continue functioning with reduced capabilities when certain features encounter errors.

Support

If you encounter persistent errors or issues not covered here:

Last updated on

On this page