Skip to content

Conversation

@CoMPaTech
Copy link
Owner

@CoMPaTech CoMPaTech commented Sep 26, 2025

Summary by CodeRabbit

  • Refactor
    • Adjusted login error handling to provide more consistent reporting during sign-in failures. No changes to the public API or configuration.
  • Chores
    • Bumped version to 0.5.3.

Note: End users may notice more uniform error behavior when login fails, but no functional changes are expected in normal operation.

@coderabbitai
Copy link

coderabbitai bot commented Sep 26, 2025

Walkthrough

Adjusts login exception handling in airos/base.py to catch only AirOSConnectionSetupError, letting authentication errors propagate differently. Updates project version from 0.5.2 to 0.5.3 in pyproject.toml.

Changes

Cohort / File(s) Summary of Changes
Login exception handling
airos/base.py
Modified login flow to catch only AirOSConnectionSetupError; removed catching of AirOSConnectionAuthenticationError. No signature/API changes.
Version bump
pyproject.toml
Incremented project version from 0.5.2 to 0.5.3 in [project].

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant Base as Base.login()
  participant AirOS as AirOS Device

  Client->>Base: login(credentials)
  Base->>AirOS: establish_session()
  alt Success
    AirOS-->>Base: session established
    Base-->>Client: return session
  else Failure
    AirOS-->>Base: error
    opt New handling
      Note over Base: Catch only AirOSConnectionSetupError
      Base-->>Client: raise AirOSConnectionSetupError
    end
    opt Authentication error
      Note over Base: AirOSConnectionAuthenticationError propagates
      Base-->>Client: raise AirOSConnectionAuthenticationError
    end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Further refactoring #70 — Also modifies login/auth error handling distinctions, overlapping with the exception scope changed here.
  • Add/rework exceptions #13 — Introduced/split ConnectionSetupError vs ConnectionAuthenticationError; directly related to which exceptions are now caught.

Poem

A hop, a skip, a tidy fix—
I trimmed the nets for auth’s small tricks.
Setup snared, auth free to leap,
Version bumps another sleep.
In burrows deep, my logs will show—
Which path to catch, which one to throw. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “Remove raise override” is too vague to clearly convey that the change adjusts login error handling by removing the catch of AirOSConnectionAuthenticationError; it does not specify what override is being removed or which part of the code is affected. Please clarify the title to reference the specific change, for example “Only catch AirOSConnectionSetupError in login flow, letting AuthenticationError propagate,” so reviewers can immediately understand the core modification.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch authfix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 301a1e5 and ccfee53.

📒 Files selected for processing (2)
  • airos/base.py (1 hunks)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
airos/base.py (1)
airos/exceptions.py (1)
  • AirOSConnectionSetupError (8-9)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run pytest using Python 3.13
🔇 Additional comments (1)
airos/base.py (1)

262-263: Authentication errors now surface correctly

Letting AirOSConnectionAuthenticationError propagate keeps the original semantics for callers while still wrapping setup failures with context. Looks good.


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.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (7f827fd) to head (ccfee53).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #97   +/-   ##
=======================================
  Coverage   91.85%   91.85%           
=======================================
  Files           7        7           
  Lines         909      909           
=======================================
  Hits          835      835           
  Misses         74       74           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CoMPaTech CoMPaTech merged commit c3fb2ca into main Sep 26, 2025
14 checks passed
@CoMPaTech CoMPaTech deleted the authfix branch September 26, 2025 21:19
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