Skip to content

feat(delivery): filter by failure reason and last status code - #17

Merged
kamilmysliwiec merged 2 commits into
nestjs:masterfrom
acefolioDev:feature/delivery-query-filters
Oct 8, 2026
Merged

kamilmysliwiec merged 2 commits into
nestjs:masterfrom
acefolioDev:feature/delivery-query-filters

Conversation

@acefolioDev

Copy link
Copy Markdown
Contributor

PR Checklist

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

WebhookDeliveries.list() cannot filter by a delivery鈥檚 stored failureReason or lastStatusCode.

Issue Number: N/A

What is the new behavior?

Adds optional failureReason and lastStatusCode query filters to the in-memory, PostgreSQL, and MySQL stores. Filters run before ordering and pagination. Omitting a filter matches any value; passing null matches stored null, so lastStatusCode: null finds deliveries with no HTTP response.

The shared store contract and public list tests cover these filters, their combination with existing filters, and null matching.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

No schema migration is needed because both values are already stored. API comments were updated. Focused tests and the TypeScript check passed.

The user-facing NestJS webhooks guide lives in a separate documentation repository and has not yet been updated.

acefolioDev and others added 2 commits October 8, 2026 15:07
Validate lastStatusCode in WebhookDeliveries.list() and retry(), so every
store refuses a non-status value the same way. Add failureReason and
lastStatusCode to WebhookDeliveryFilter, share the nullable integer
comparison in the SQL stores, and document the filters' semantics.
@kamilmysliwiec
kamilmysliwiec merged commit c28c17f into nestjs:master Oct 8, 2026
7 checks passed
@acefolioDev
acefolioDev deleted the feature/delivery-query-filters branch October 8, 2026 12:16
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.

2 participants