Skip to content

Handle malformed webhook event config#24

Open
aiirvizionz wants to merge 1 commit into
moshcoder:masterfrom
aiirvizionz:clientkit/safe-webhook-events-display
Open

Handle malformed webhook event config#24
aiirvizionz wants to merge 1 commit into
moshcoder:masterfrom
aiirvizionz:clientkit/safe-webhook-events-display

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Fixes a dashboard crash when an outbound webhook row has malformed or empty events data.

Before this change, the project webhooks view parsed e.events inline during render. Any bad stored value could throw from JSON.parse and prevent the dashboard from rendering.

This PR adds a defensive formatter so valid arrays still render normally, empty configs show all events, and malformed configs show invalid event config instead of crashing the page.

Validation:

  • npx tsc --noEmit
  • git diff --check

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.

1 participant