Closed Duaard closed 4 months ago
Thanks for reporting!
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
Hi @mcollina thanks for response, here I created a test repo: https://github.com/Duaard/unhandled-async-error
Steps to run:
docker compose up
npm i
npm start
Prerequisites
Fastify version
4.26.1
Plugin version
6.1.1
Node.js version
20.10.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
13.3
Description
As the title states, there's an unhandled async error when an invalid credentials are provided. This makes it hard to catch and display a custom error message.
Steps to Reproduce
@fastify/redis
package and register it.try...catch
during plug in registration.Expected Behavior
Async errors are handled and propagated through the plugin registration.