Skip to content

fix(cli): keep cause and meta when listing a request's ignored events - #503

Open
pcbeingused333 wants to merge 1 commit into
hookdeck:mainfrom
pcbeingused333:fix/ignored-events-cause
Open

pcbeingused333 wants to merge 1 commit into
hookdeck:mainfrom
pcbeingused333:fix/ignored-events-cause

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #430

Cause. GET /requests/{id}/ignored_events returns id, team_id, webhook_id, cause, request_id, meta, created_at, but GetRequestIgnoredEvents decoded it into EventListResponse/Event, which has no cause or meta. So hookdeck gateway request ignored-events and the MCP list_ignored action dropped the only fields that say why an event was ignored (FILTERED vs CLI_DISCONNECTED) and emitted empty status/source_id/destination_id.

Fix. Add an IgnoredEvent / IgnoredEventListResponse type matching the IgnoredEvent schema in the 2026-09-01 OpenAPI document, decode into it, and have the MCP tool return it. The plain-text output now prints the cause instead of an always-empty status.

Test. TestGetRequestIgnoredEventsKeepsCauseAndMeta serves a page with a FILTERED event (meta is an array), a TRANSFORMATION_FAILED event (meta is an object) and a CLI_DISCONNECTED event (meta null), and checks cause and meta survive and that no status key is emitted. It does not build on main and passes with the change; the pkg/hookdeck, pkg/gateway/mcp and pkg/cmd suites pass.

Reproduction. hookdeck gateway request ignored-events <request-id> --output json on a request with a filtered connection: cause and meta are missing from the output.

This PR was prepared with AI assistance (Claude Code) and the contributor is responsible for the change.

GetRequestIgnoredEvents decoded the response into EventListResponse, which has
no cause or meta, so the CLI and the MCP list_ignored action dropped the fields
that say why an event was ignored. Decode into a new IgnoredEvent type and print
the cause instead of the always-empty status.
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.

gateway request ignored-events omits the cause field

1 participant