Generic webhooks return {"ok":false,"error":"Failed to process webhook"} when both waitForComplete and a transformation function are enabled. The message posts to the room fine, but the HTTP caller gets an error.
Each works independently — only the combination breaks.
Cause: When the transformation's execute() throws, onGenericHook sets successful = false but still delivers a fallback message. Without waitForComplete the caller gets HTTP 202 (successful: null path). With waitForComplete, the false reaches the Router and returns HTTP 500. This also makes webhookResponse (#839) unusable since it requires waitForComplete.
A secondary issue: if onGenericHook throws with waitForComplete on, Bridge.ts never queues a response — the caller gets a generic error with no details.
Fix branch: https://github.com/yncyrydybyl/matrix-hookshot/tree/yncyrydybyl/fix-waitforcomplete-transformation
Related: #247, #839
Generic webhooks return
{"ok":false,"error":"Failed to process webhook"}when bothwaitForCompleteand a transformation function are enabled. The message posts to the room fine, but the HTTP caller gets an error.Each works independently — only the combination breaks.
Cause: When the transformation's
execute()throws,onGenericHooksetssuccessful = falsebut still delivers a fallback message. WithoutwaitForCompletethe caller gets HTTP 202 (successful: nullpath). WithwaitForComplete, thefalsereaches the Router and returns HTTP 500. This also makeswebhookResponse(#839) unusable since it requireswaitForComplete.A secondary issue: if
onGenericHookthrows withwaitForCompleteon, Bridge.ts never queues a response — the caller gets a generic error with no details.Fix branch: https://github.com/yncyrydybyl/matrix-hookshot/tree/yncyrydybyl/fix-waitforcomplete-transformation
Related: #247, #839