-
-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
🐛 Bug Report
When async style is used, undefined promise error is always logged.
Originally filed in as help issue 106
To Reproduce
Steps to reproduce the behavior:
Change the example in in project to use async and watch logs.
'use strict';
const path = require('path');
const fastify = require('fastify')({ logger: { level: 'trace' } });
fastify
.register(require('../'), { root: path.join(__dirname, '/public') })
.get('/', async (request, reply) => {
reply.sendFile('index.css');
});
fastify.listen(3000, err => {
if (err) throw err;
});Expected behavior
No promise undefined error to be logged as per Promise resolution documentation.
Your Environment
- node version:
12.7.0 - fastify version:
2.8.0 - os:
Mac
Metadata
Metadata
Assignees
Labels
No labels