Skip to content

Surface error details in todo complete/reopen#252

Merged
jeremy merged 3 commits intomainfrom
fix/todo-completion-errors
Mar 11, 2026
Merged

Surface error details in todo complete/reopen#252
jeremy merged 3 commits intomainfrom
fix/todo-completion-errors

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 11, 2026

Summary

  • When all todo completion or reopen operations fail, the CLI now returns a structured error with SDK error details (HTTP status, rate-limit hints, retryability) instead of silently returning a "Completed 0" success response
  • Mirrors the established pattern from comment.go:318-365
  • Both completeTodos and reopenTodos get the same treatment

Test plan

  • basecamp done <invalid-id> returns structured error with non-zero exit
  • basecamp done <valid-id> still succeeds normally
  • basecamp reopen <invalid-id> returns structured error
  • bin/ci passes

@jeremy jeremy requested a review from a team as a code owner March 11, 2026 03:37
Copilot AI review requested due to automatic review settings March 11, 2026 03:37
@github-actions github-actions bot added commands CLI command implementations bug Something isn't working labels Mar 11, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the todo batch operations (done/todos complete and reopen/todos uncomplete) so that when all requested operations fail, the CLI returns a failure (including converted SDK error details) instead of emitting a misleading “Completed 0…” / “Reopened 0…” success response. This aligns the behavior with the existing multi-target error handling pattern used in comment.go.

Changes:

  • Track the first API error during batch complete/uncomplete operations.
  • When all operations fail, return a converted structured error (or usage error) for better automation/exit codes.
  • Apply the same behavior to both completeTodos and reopenTodos.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

When all todo completion or reopen operations fail, the CLI now returns
a structured error with the SDK error details (HTTP status, rate-limit
hints, retryability) instead of silently returning a "Completed 0"
success response. Mirrors the established pattern from comment.go.
@jeremy jeremy force-pushed the fix/todo-completion-errors branch from efb1a99 to 7e94205 Compare March 11, 2026 03:54
@github-actions github-actions bot added the tests Tests (unit and e2e) label Mar 11, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 04:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Validates the error contract (not just message text) so structured
error fields don't regress silently.
@jeremy jeremy merged commit f39c709 into main Mar 11, 2026
26 checks passed
@jeremy jeremy deleted the fix/todo-completion-errors branch March 11, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working commands CLI command implementations tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants