Conversation
- Add `UnauthorizedError` for handling unauthorized API actions - Replace `InvalidProjectError` with `InvalidModelIdError` - Modify `raise_api_error()` to handle more complex error response structures - Update error code mappings to match new API error conventions - Remove deprecated error classes and mappings
PR SummaryThis pull request introduces several enhancements to the error handling mechanism within the
These changes aim to improve the clarity and accuracy of error reporting within the library, making it easier for developers to diagnose and handle API errors effectively. Test Suggestions
|
Internal Notes for Reviewers
refactor: Update error handling and API error mapping in errors.py
UnauthorizedErrorfor handling unauthorized API actionsInvalidProjectErrorwithInvalidModelIdErrorraise_api_error()to handle more complex error response structuresI noticed we were getting obscure errors after the API errors refactor:
Note that we still need to migrate this:
External Release Notes