Skip to content

Log GitHub API error details when posting PR review fails#17

Merged
bnavetta merged 1 commit intomainfrom
warp-agent/REMOTE-1115-log-api-error-details
Mar 26, 2026
Merged

Log GitHub API error details when posting PR review fails#17
bnavetta merged 1 commit intomainfrom
warp-agent/REMOTE-1115-log-api-error-details

Conversation

@bnavetta
Copy link
Copy Markdown
Contributor

Summary

When the GitHub API returns a 422 error (e.g. "Line could not be resolved") while posting a PR review, the current error handling only logs the generic error message. This makes it difficult to diagnose which specific comments had invalid line numbers.

This change adds detailed error logging to the Post Review step's catch block in the review-pr workflow:

  • Logs error.response.data.errors (the array of specific validation errors from GitHub)
  • Logs the full error.response.data object

This will make it much easier to debug issues like REMOTE-1115 where comments reference lines that can't be resolved in the PR diff.

Changes

  • examples/review-pr.yml — Added detailed GitHub API error logging in the catch block
  • .github/workflows/review-pr.yml — Regenerated from the example

Conversation: https://staging.warp.dev/conversation/e0d991b8-39dd-4d78-85e3-c621fc1fcd2a
Run: https://oz.staging.warp.dev/runs/e3f0715f-e937-4b02-a7c4-dfa07927508f

This PR was generated with Oz.

When the GitHub API returns a 422 (e.g. 'Line could not be resolved'),
log error.response.data.errors and the full response data so we can see
which specific comments were invalid.

Co-Authored-By: Oz <oz-agent@warp.dev>
@bnavetta bnavetta requested a review from captainsafia March 23, 2026 10:32
@bnavetta bnavetta merged commit ce1621a into main Mar 26, 2026
5 checks passed
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