Overview
This release refactor QuickNodeAPI class to be more a clean and less redundant and made error handling more robust. The API now handles edge cases that previously went unnoticed.
馃幆 Core Improvements
Streamlined Architecture
- DRY Principle Applied: Consolidated duplicate request logic into a single
_make_request()method that handles all API calls - Modular Error Handling: Extracted error handling into dedicated methods (
_check_response,_handle_request_exception) for cleaner, more maintainable code - Configurable Constants: Introduced class-level constants for timeouts and retry delays, making adjustments a breeze:
RATE_LIMIT_SECONDS = 1 CONNECTION_RETRY_SECONDS = 300 TIMEOUT_RETRY_SECONDS = 120 REQUEST_TIMEOUT = 60
Bug Fixes
- Fixed logger identity crisis: renamed from
moralis_APItoquicknode_API馃悰
New Error Handling
- SSLError Support: Now skips to the next API key on SSL failures
- 403 Forbidden: Properly logs and fails over instead of crashing
- Exhausted Keys: Clear "All API keys exhausted" message when all endpoints fail
- JSON Decode Errors: Handles malformed API responses without breaking
Developer Experience
- Added input validation for
api_keysanddefault_api_key_idxparameters - Added return type hints across all methods for better IDE support
馃И Test Suite Revamp
- Reorganized tests into focused, logical test classes
- Added comprehensive coverage for all new helper methods
- New integration tests for complete failover scenarios
- Edge case coverage for initialization and error paths
Full Changelog: v1.2.1...v1.3