Skip to content

fix: inherit plugin retry options and align TypeScript definitions - #503

Closed
hoanle0126 wants to merge 1 commit into
fastify:mainfrom
hoanle0126:fix/retry-options-defaults-and-types
Closed

hoanle0126 wants to merge 1 commit into
fastify:mainfrom
hoanle0126:fix/retry-options-defaults-and-types

Conversation

@hoanle0126

Copy link
Copy Markdown

Checklist

Description

Fixes #296

  • Preserves retriesCount, maxRetriesOn503, and retryDelay configured at plugin registration as default values for reply.from() calls (previously shadowed by the inner opts argument in fastify.decorateReply('from', function (source, opts))).
  • Uses nullish coalescing (??) for retriesCount and maxRetriesOn503 so setting maxRetriesOn503: 0 or retriesCount: 0 works as expected instead of falling back to 10.
  • Adds retriesCount and retryDelay to FastifyReplyFromOptions and maxRetriesOn503 to FastifyReplyFromHooks in types/index.d.ts.

@hoanle0126 hoanle0126 closed this by deleting the head repository Nov 6, 2026
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.

retriesCount not defined in interface FastifyReplyFromHooks

1 participant