Skip to content

Conversation

@brandon-pereira
Copy link
Member

Adds the ability to edit existing webhooks and also test them

Screenshot 2025-11-04 at 8 31 00 AM Screenshot 2025-11-04 at 8 52 39 AM

Fixes HDX-2672

Closes #1069

@brandon-pereira brandon-pereira requested review from a team and teeohhem and removed request for a team November 4, 2025 17:08
@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

🦋 Changeset detected

Latest commit: 7aa7db6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/api Patch
@hyperdx/app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Nov 4, 2025 5:10pm

@claude
Copy link

claude bot commented Nov 4, 2025

PR Review: Webhook UX Improvements

Overall: Well-implemented feature with good test coverage. A few issues to address:

Critical Issues

  • ⚠️ Missing error handling in test endpoint (webhooks.ts:251-254) → Webhook test errors are not caught - network failures or invalid URLs will cause unhandled promise rejections that may crash the server. Wrap the webhook send calls in try-catch.

  • Unsaved webhook test object (webhooks.ts:234-241) → Creating new Webhook() without .save() for test may cause issues if webhook handlers expect saved documents with IDs or timestamps. Use plain object instead of Mongoose instance.

Code Quality Issues

  • 🔍 Inconsistent typing (api.ts:332-395) → Return types use any in mutation definitions. Should use proper types from types.ts (e.g., { data: Webhook }).

  • ⚠️ Service type validation (webhooks.ts:254-257) → The else block for unsupported service type is unreachable due to Zod validation. Remove dead code or add comment explaining it is defensive.

Suggestions

  • Consider adding rate limiting to the test endpoint to prevent abuse
  • The webhook form disables service type during edit (WebhookForm.tsx:256, 261) - document why in a comment if intentional

Action: Address the error handling and Mongoose instance issues before merging.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

E2E Test Results

All tests passed • 39 passed • 3 skipped • 315s

Status Count
✅ Passed 39
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 3

View full report →

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.

Feature Request: Allow editing the body of a generic webhook

2 participants