Skip to content

refactor: adopt CliError in additional adapters#378

Closed
jackwener wants to merge 2 commits intomainfrom
refactor/clierror-additional-adapters
Closed

refactor: adopt CliError in additional adapters#378
jackwener wants to merge 2 commits intomainfrom
refactor/clierror-additional-adapters

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

Continue CliError adoption for adapters not covered in PR #375.

Changes

  • boss (7 files): AuthRequiredError, CommandExecutionError, EmptyResultError, SelectorError, ArgumentError
  • xiaohongshu (7 files): ArgumentError, AuthRequiredError, CommandExecutionError, SelectorError
  • antigravity (5 files): SelectorError, ConfigError, BrowserConnectError, ArgumentError
  • coupang (2 files): ArgumentError, AuthRequiredError, CommandExecutionError, SelectorError
  • doubao-app (2 files): SelectorError
  • chaoxing (2 files): AuthRequiredError, EmptyResultError
  • discord-app (2 files): SelectorError
  • notion (1 file): SelectorError
  • douban (1 file): AuthRequiredError
  • sinablog (1 file): CommandExecutionError
  • barchart (1 file): AuthRequiredError
  • reddit (2 files): CommandExecutionError (additional fixes)

31 files changed

Test

  • 230 tests pass
  • Typecheck clean

Replace raw Error throws with appropriate CliError subclasses in:
- antigravity (5 files): SelectorError for UI elements
- barchart (1 file): AuthRequiredError for login issues
- boss (7 files): AuthRequiredError, CommandExecutionError, SelectorError, EmptyResultError
- chaoxing (1 file): CommandExecutionError
- coupang (2 files): ArgumentError, CommandExecutionError
- discord-app (2 files): SelectorError for UI elements
- douban (1 file): EmptyResultError
- doubao-app (2 files): CommandExecutionError, SelectorError
- notion (1 file): SelectorError for UI elements
- sinablog (1 file): CommandExecutionError
- xiaohongshu (7 files): AuthRequiredError, CommandExecutionError, EmptyResultError, ArgumentError, TimeoutError

Based on work from @coding-claude-opus (PR #374), excludes social adapters
already covered by PR #375.
- reddit/saved.ts, reddit/upvoted.ts: Use CommandExecutionError for API errors
- chaoxing/assignments.ts: Use EmptyResultError for course not found
@jackwener jackwener closed this Mar 24, 2026
@jackwener jackwener deleted the refactor/clierror-additional-adapters branch March 24, 2026 13:43
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