Skip to content

fix(hooks): return 200 instead of 202 for webhook responses#28204

Merged
shakkernerd merged 3 commits intoopenclaw:mainfrom
Glucksberg:fix/issue-22036
Mar 3, 2026
Merged

fix(hooks): return 200 instead of 202 for webhook responses#28204
shakkernerd merged 3 commits intoopenclaw:mainfrom
Glucksberg:fix/issue-22036

Conversation

@Glucksberg
Copy link
Contributor

Summary

  • Change webhook hook endpoint response status from 202 Accepted to 200 OK for successfully dispatched agent hook requests
  • Fixes Forward Email integration which requires 200 status and bounces with 550 on any other code

Closes #22036

Test plan

  • All existing server.hooks.test.ts tests updated and passing (7/7)
  • Manual verification with Forward Email webhook integration

🤖 Generated with Claude Code

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

Changed webhook endpoint response status from 202 Accepted to 200 OK for successfully dispatched agent hook requests to fix Forward Email integration compatibility.

  • Updated both /hooks/agent response paths in server-http.ts to return 200 instead of 202
  • Updated all 10 test assertions in server.hooks.test.ts to expect 200 status
  • The webhook documentation (docs/automation/webhook.md line 162) needs to be updated to reflect the new 200 status code

Confidence Score: 4/5

  • This PR is safe to merge with the documentation update addressed
  • The code changes are minimal and correct - simply changing HTTP status codes from 202 to 200 in two locations. All tests have been properly updated to reflect the new behavior. The change fixes a real integration issue with Forward Email. One point deducted because the webhook documentation needs to be updated to reflect the new status code.
  • Update docs/automation/webhook.md to reflect the 200 status code change

Last reviewed commit: 426b887

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Additional Comments (1)

docs/automation/webhook.md
Update to reflect new behavior - should be 200 instead of 202

- `200` for `/hooks/agent` (async run started)
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/automation/webhook.md
Line: 162

Comment:
Update to reflect new behavior - should be `200` instead of `202`

```suggestion
- `200` for `/hooks/agent` (async run started)
```

How can I resolve this? If you propose a fix, please make it concise.

shakkernerd added a commit to Glucksberg/OpenClaw that referenced this pull request Mar 3, 2026
@aisle-research-bot
Copy link

aisle-research-bot bot commented Mar 3, 2026

🤖 We're reviewing this PR with Aisle

We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛
We'll post the results here as soon as they're ready.

Progress:

  • Analysis
  • Triage
  • Finalization

Latest run failed. Keeping previous successful results. Trace ID: 019cb10b47d0489e286748bfb22af49a.

Last updated on: 2026-03-03T00:14:03Z

Latest run failed. Keeping previous successful results. Trace ID: 019cb110384c80a0688b3cc1a9a72340.

Last updated on: 2026-03-03T00:25:57Z

@openclaw-barnacle openclaw-barnacle bot added the docs Improvements or additions to documentation label Mar 3, 2026
shakkernerd added a commit to Glucksberg/OpenClaw that referenced this pull request Mar 3, 2026
@shakkernerd shakkernerd merged commit 051b380 into openclaw:main Mar 3, 2026
9 checks passed
@shakkernerd
Copy link
Member

Merged via squash.

Thanks @Glucksberg!

@aisle-research-bot
Copy link

aisle-research-bot bot commented Mar 3, 2026

🤖 We're reviewing this PR with Aisle

We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛
We'll post the results here as soon as they're ready.

Progress:

  • Analysis
  • Triage
  • Finalization

Latest run failed. Keeping previous successful results. Trace ID: 019cb10f1d13e34bfefe24379847d38c.

Last updated on: 2026-03-03T00:21:45Z

dawi369 pushed a commit to dawi369/davis that referenced this pull request Mar 3, 2026
…#28204)

* fix(hooks): return 200 instead of 202 for webhook responses (openclaw#22036)

* docs(webhook): document 200 status for hooks agent

* chore(changelog): add webhook ack note openclaw#28204 thanks @Glucksberg

---------

Co-authored-by: Shakker <shakkerdroid@gmail.com>
OWALabuy pushed a commit to kcinzgg/openclaw that referenced this pull request Mar 4, 2026
…#28204)

* fix(hooks): return 200 instead of 202 for webhook responses (openclaw#22036)

* docs(webhook): document 200 status for hooks agent

* chore(changelog): add webhook ack note openclaw#28204 thanks @Glucksberg

---------

Co-authored-by: Shakker <shakkerdroid@gmail.com>
AytuncYildizli pushed a commit to AytuncYildizli/openclaw that referenced this pull request Mar 4, 2026
…#28204)

* fix(hooks): return 200 instead of 202 for webhook responses (openclaw#22036)

* docs(webhook): document 200 status for hooks agent

* chore(changelog): add webhook ack note openclaw#28204 thanks @Glucksberg

---------

Co-authored-by: Shakker <shakkerdroid@gmail.com>
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…#28204)

* fix(hooks): return 200 instead of 202 for webhook responses (openclaw#22036)

* docs(webhook): document 200 status for hooks agent

* chore(changelog): add webhook ack note openclaw#28204 thanks @Glucksberg

---------

Co-authored-by: Shakker <shakkerdroid@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhook hooks return 202 instead of 200, breaking Forward Email integration

2 participants