Skip to content

Conversation

@alecrajeev
Copy link

@alecrajeev alecrajeev commented Dec 19, 2025

Issue

Github recently updated their response code detailed here #317:

Fetched Workflow ID: 118145225
Error: dispatchWorkflow: An unexpected error has occurred: Failed to dispatch action, expected 204 but received 200
Error: Failed: An unhandled error has occurred: Failed to dispatch action, expected 204 but received 200
Error: Failed: An unhandled error has occurred: Failed to dispatch action, expected 204 but received 200
Error: Error: failed to run script step: command terminated with non-zero exit code: error executing command [sh -e /__w/_temp/8ad9f6b0-dc75-11f0-8216-d9d1b2e5bc1a.sh], exit code 1
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

Fix

Update the allowed response codes from github.

I tested this with an internal repo and it was successful.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced workflow dispatch success validation to recognize additional response types, improving system reliability and reducing false failure reports. Workflows that were previously marked as failed due to overly restrictive validation now complete successfully, enabling more consistent automation execution.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 19, 2025

Walkthrough

The PR modifies the WorkflowDispatch response validation in src/api.ts to accept HTTP status codes 200 and 204 as success responses, expanding from accepting only 204 previously. The error message is correspondingly updated to reference both status codes.

Changes

Cohort / File(s) Summary
Workflow Dispatch Response Validation
src/api.ts
Relaxed HTTP status code check from exclusive 204 acceptance to accept both 200 and 204; updated error messaging to reflect both success codes

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file modification with straightforward conditional logic change
  • Status code validation update with minimal logic impact
  • Error message alignment with code behavior

Possibly related issues

Poem

🐰 A dispatch that once was strict and narrow,
Now bends with grace—a wider arrow!
Two status codes, both tried and true,
HTTP's kindness shines right through! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'fix github response' is vague and generic, using non-descriptive language that doesn't convey the specific nature of the change (accepting HTTP 200 in addition to 204 for WorkflowDispatch responses). Consider using a more specific title like 'Accept HTTP 200 or 204 for WorkflowDispatch response' to clearly communicate the actual change being made.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f080a7b and 7a798ab.

⛔ Files ignored due to path filters (1)
  • dist/index.mjs is excluded by !**/dist/**
📒 Files selected for processing (1)
  • src/api.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/api.ts (1)
dist/index.mjs (16)
  • response (13173-13173)
  • response (13250-13250)
  • response (13371-13377)
  • response (13465-13465)
  • response (13570-13570)
  • response (13699-13699)
  • response (15416-15416)
  • response (17594-17594)
  • response (17857-17861)
  • response (23474-23474)
  • response (23973-23973)
  • response (24060-24069)
  • response (24145-24149)
  • response (24176-24194)
  • response (24225-24236)
  • response (24269-24269)
🔇 Additional comments (1)
src/api.ts (1)

34-38: Remove the 200 status code check unless production evidence exists that GitHub API returns it. The official GitHub API documentation documents the createWorkflowDispatch endpoint as returning Status: 204. The condition should validate only for 204 unless there is concrete evidence that GitHub returns 200 for this specific endpoint. The eslint-disable comment suggests this logic was already questioned during development.

If the change is necessary due to an actual production issue, please provide:

  • A link to the GitHub issue or documentation showing 200 is a valid response
  • Real-world examples where the API returned 200
  • Clarification on which GitHub API version changed behavior

Otherwise, simplify the validation to check only for 204, consistent with GitHub's documented API specification.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alecrajeev
Copy link
Author

@Codex- I think I have a fix in-place for the bug

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.

3 participants