Skip to content

feat: add support for setting resolve timeout #82

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

Merged
merged 1 commit into from
Apr 17, 2025
Merged

feat: add support for setting resolve timeout #82

merged 1 commit into from
Apr 17, 2025

Conversation

nicklasl
Copy link
Member

@nicklasl nicklasl commented Apr 17, 2025

Add timeout support to Confidence SDK

This PR adds timeout configuration and improved error handling to the Confidence Python SDK:

Changes

  • Add configurable timeout for network requests (default: 10 seconds)
  • Properly handle request timeouts with descriptive error messages
  • Return default values with appropriate error codes when timeouts occur
  • Improve error handling in flag resolution methods
  • Add TIMEOUT to error codes and reasons
  • Update documentation with timeout configuration examples

Benefits

  • Better reliability in high-latency environments
  • More predictable behavior when network issues occur
  • Improved developer experience with clear error messages
  • Enhanced control over SDK behavior in production environments
  • This change allows developers to configure shorter timeouts when needed, ensuring applications remain responsive even when the flag resolution service is experiencing delays.

@nicklasl nicklasl merged commit 469be0d into main Apr 17, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants