Skip to content

Make thenable plugins have the right name on errors - #359

Merged
mcollina merged 1 commit into
fastify:mainfrom
segevfiner:fix-thenable-plugin-name
Aug 11, 2026
Merged

Make thenable plugins have the right name on errors#359
mcollina merged 1 commit into
fastify:mainfrom
segevfiner:fix-thenable-plugin-name

Conversation

@segevfiner

Copy link
Copy Markdown
Contributor

When an plugin registerd via an import without
await timeouts you got the useless [object Promise] name in the error message. This PR fixes
that by setting name of the plugin earlier so that
it is used in the error message.

Checklist

When an plugin registerd via an `import` without
await timeouts you got the useless `[object
Promise]` name in the error message. This PR fixes
that by setting name of the plugin earlier so that
it is used in the error message.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
mcollina merged commit 80d7169 into fastify:main Aug 11, 2026
17 checks passed
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.

3 participants