Skip to content

Yncyrydybyl/fix waitforcomplete transformation#1252

Open
yncyrydybyl wants to merge 6 commits intomatrix-org:mainfrom
yncyrydybyl:yncyrydybyl/fix-waitforcomplete-transformation
Open

Yncyrydybyl/fix waitforcomplete transformation#1252
yncyrydybyl wants to merge 6 commits intomatrix-org:mainfrom
yncyrydybyl:yncyrydybyl/fix-waitforcomplete-transformation

Conversation

@yncyrydybyl
Copy link
Copy Markdown
Member

This should fix #1251.

This is mainly created by claude and should be carefully reviewed before merging.

Yan Minagawa and others added 3 commits March 29, 2026 02:07
Two fixes:

1. GenericHook.ts: Don't mark webhook as failed when the transformation
   function throws. The message still gets delivered to the room with
   fallback text, so the webhook was successfully processed. Previously,
   waitForComplete callers received {"ok":false} even though the message
   was posted.

2. Bridge.ts: When waitForComplete is enabled and onGenericHook throws
   (e.g. Matrix send failure), queue a proper error response with the
   actual error message instead of falling through to a generic
   {"ok":false,"error":"Failed to process webhook"}.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verifies that onGenericHook returns successful:true even when the
transformation function throws, since the message is still delivered
with fallback text. Also tests that webhookResponse flows through
from a successful transformation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests the full matrix of onGenericHook return values: successful
transformations with/without webhookResponse, failed transformations
(fallback text delivery, no webhookResponse leak), empty results
with webhookResponse, simple webhooks without transformations,
and custom msgtype handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yncyrydybyl yncyrydybyl requested a review from a team as a code owner March 28, 2026 21:10
Yan Minagawa and others added 3 commits March 29, 2026 04:13
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

waitForComplete + transformation function returns HTTP error

1 participant