Skip to content

fix(api): report empty error responses - #1452

Merged
BYK merged 2 commits into
mainfrom
fix/api-empty-error-1423
Aug 22, 2026
Merged

fix(api): report empty error responses#1452
BYK merged 2 commits into
mainfrom
fix/api-empty-error-1423

Conversation

@BYK

@BYK BYK commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #1423.

  • Preserve HTTP status text from API responses.
  • Report useful status and request context when a non-2xx response has an empty textual body.
  • Keep JSON responses machine-readable with a {status, statusText, body} envelope while applying --fields to the API body.
  • Preserve raw binary successes and summarize binary errors without emitting response bytes.
  • Classify every status outside the 2xx range consistently, including 3xx responses.

Verification

  • pnpm exec vitest run test/commands/api.test.ts test/e2e/api.test.ts
  • pnpm exec vitest run test/lib test/commands test/types test/script --coverage
  • pnpm run typecheck
  • pnpm run lint
  • git diff --check

The package test:unit wrapper failed before reporting results with Unknown: ChildProcess.kill; the equivalent direct Vitest command passed 9,243 tests with 16 skipped.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 22, 2026 12:25pm

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 21, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6b14659. Configure here.

Comment thread packages/cli/src/commands/api.ts
@BYK
BYK merged commit 7b0878e into main Aug 22, 2026
32 checks passed
@BYK
BYK deleted the fix/api-empty-error-1423 branch August 22, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sentry api: empty-body 404 prints nothing on stdout or stderr

1 participant