-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Goal
Improve the SDK's error handling to better serve both traditional Python developers and AI/LLM integrations by providing more detailed error information and structured responses.
Context
The current SDK implementation returns raw httpx.Response objects which require manual processing and don't provide detailed error information when things go wrong. This becomes particularly problematic when integrating with AI agents and LLMs that work better with structured data. The proposed solution would implement an enhanced exception handling system that returns parsed JSON data on success and provides comprehensive error details through a custom FewsatsHTTPError class. This approach maintains familiar Python error handling patterns while offering the detailed feedback needed for effective debugging and automated error recovery.