Skip to content

feat: add configurable request timeout - #22

Merged
tnware merged 2 commits into
mainfrom
feat/request-timeout-support
May 26, 2026
Merged

tnware merged 2 commits into
mainfrom
feat/request-timeout-support

Conversation

@tnware

@tnware tnware commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a request_timeout constructor option for controller HTTP requests.
  • Applies the configured timeout to authentication, GET requests, and generic mutating/API requests.
  • Keeps backward compatibility by defaulting to None, preserving requests' existing no-timeout behavior unless users opt in.
  • Documents the option in README and API docs.

Test Plan

  • ruff check .
  • pytest -q
  • python -m build
  • twine check dist/*
  • sphinx-build -E -W -b html docs docs/_build/html
  • git diff --check

Notes

This is the next small runtime-safety PR after API-level error handling. It avoids changing default behavior while giving users a power/safety knob to prevent indefinitely hanging controller calls.

@coderabbitai

coderabbitai Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@tnware, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 18 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c136ba33-4201-4171-ad1b-30edbbf7f1e1

📥 Commits

Reviewing files that changed from the base of the PR and between 0ba396f and e04b7ce.

📒 Files selected for processing (5)
  • README.md
  • docs/api/client.rst
  • docs/index.rst
  • tests/test_request_timeout.py
  • unifi_controller_api/api_client.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/request-timeout-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tnware
tnware merged commit 824af80 into main May 26, 2026
7 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.

1 participant