Skip to content

fix(taskprocessing): AppAPI webhook error handling - #62597

Draft
joshtrichards wants to merge 3 commits into
masterfrom
jtr/fix-taskProcessing-runWebHook-Hardening
Draft

fix(taskprocessing): AppAPI webhook error handling#62597
joshtrichards wants to merge 3 commits into
masterfrom
jtr/fix-taskProcessing-runWebHook-Hardening

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Harden TaskProcessing AppAPI webhook handling.

  • (Commit 1) Validate AppAPI:<exAppId>:<method> webhook methods before parsing and return safely when malformed.
    • Previously, malformed AppAPI: methods were logged but execution continued.
  • (Commit 2) Harden error handling for ExApp webhook requests.
    • Pass ExApp request errors as PSR-3 logger context instead of as a scalar value.
    • Previously, logging an array response error could itself throw a TypeError, masking the webhook failure.
    • Catch exceptions thrown by exAppRequest() so failed AppAPI webhook calls do not interrupt task completion.
  • (Commit 3) Reformat runWebhook() for readability.
    • Add whitespace and line wrapping, standardize logger formatting, and use early returns to reduce nesting without changing behavior.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
pure refactor: whitespace, line wrapping, logger formatting, early return/minimize some nesting

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant