Skip to content

fix(db): check the task error before the ARN print - #179

Open
ipmb wants to merge 1 commit into
mainfrom
fix/db-load-check-error-order
Open

fix(db): check the task error before the ARN print#179
ipmb wants to merge 1 commit into
mainfrom
fix/db-load-check-error-order

Conversation

@ipmb

@ipmb ipmb commented Sep 1, 2026

Copy link
Copy Markdown
Member

Problem

apppack db load starts an ECS task with StartTask. If the call fails, StartTask returns a nil task and an error. The command printed *task.TaskArn before it checked the error. The CLI then panicked, and the user did not see the real cause.

Change

Move checkErr(err) to the line after the StartTask call. The CLI now prints the error and stops. This matches the order in cmd/shell.go.

Tests

  • go build ./... — OK
  • go test ./cmd/ — OK

🤖 Generated with Claude Code

`apppack db load` starts an ECS task with `StartTask`. If the call fails,
it returns a nil task and an error. The command printed `*task.TaskArn`
before the error check, so the CLI panicked and hid the real cause.

Move `checkErr(err)` to the line after the `StartTask` call. This matches
the order in `cmd/shell.go`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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