Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced HTTP Error Handling for Fewsats SDK #1

Open
positiveblue opened this issue Feb 17, 2025 · 0 comments
Open

Enhanced HTTP Error Handling for Fewsats SDK #1

positiveblue opened this issue Feb 17, 2025 · 0 comments

Comments

@positiveblue
Copy link
Contributor

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.

Technical Design Document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant