Skip to content

fix(apply-repo-settings): surface full API error body via step summary - #63

Merged
nsheaps merged 1 commit into
mainfrom
claude/surface-422-body
May 29, 2026
Merged

nsheaps merged 1 commit into
mainfrom
claude/surface-422-body

Conversation

@jack-nsheaps

@jack-nsheaps jack-nsheaps Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Debugging the apply-repo-settings runs (post-yq-fix) is blocked because the HTTP 422 body is truncated at the first newline (the opening '{' of the JSON) in the GitHub annotation. The actual error message and field list are unreachable.

Fix:

  • Compact the error body via 'jq -c' before emitting the '::error::' annotation, so the full single-line JSON survives.
  • Append a pretty-printed version to '$GITHUB_STEP_SUMMARY' so failures are visible on the job page AND readable via '/actions/jobs/{id}' (output.summary).

Test plan

  • Merge → re-dispatch apply-repo-settings → 422 body is now fully visible

🤖

GitHub truncates the single-line ::error:: annotation at the first newline.
On a JSON error body, that's the first '{' — losing every useful field
('message', 'errors[]', etc.). Now:

  - Compact the body via jq before emitting the annotation so the full
    object survives.
  - Also append the pretty-printed body to GITHUB_STEP_SUMMARY so the full
    failure is visible on the job page and via /actions/jobs/{id} →
    output.summary.
@nsheaps
nsheaps marked this pull request as ready for review May 29, 2026 20:06
@nsheaps
nsheaps merged commit 7555ab0 into main May 29, 2026
2 checks passed
@nsheaps
nsheaps deleted the claude/surface-422-body branch May 29, 2026 20:06
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