Skip to content

Commit 332e643

Browse files
committed
fix: on error hook missing done
1 parent 1fbe64a commit 332e643

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

biome.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
"organizeImports": {
33
"enabled": true
44
},
5+
"files": {
6+
"ignore": ["**/dist", "**/node_modules"]
7+
},
58
"formatter": {
69
"enabled": true,
710
"formatWithErrors": false,
811
"indentStyle": "space",
912
"indentWidth": 2,
1013
"lineEnding": "lf",
1114
"lineWidth": 80,
12-
"attributePosition": "auto",
13-
"ignore": ["**/dist", "**/node_modules", "**/example"]
15+
"attributePosition": "auto"
1416
},
1517
"linter": {
1618
"enabled": true,

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
"type": "git",
2525
"url": "git+https://github.com/jorgevrgs/fastify-aws-powertools.git"
2626
},
27-
"files": [
28-
"dist"
29-
],
27+
"files": ["dist"],
3028
"keywords": [],
3129
"author": "Jorge Vargas <jorgevargasla@gmail.com>",
3230
"license": "MIT",

src/logger/plugins/logger.plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const fastifyAwsPowertoolsLogger: FastifyPluginAsync<
6161
}
6262
};
6363

64-
const onResponseHandler = () => {
64+
const onResponseHandler = async () => {
6565
for (const logger of loggers) {
6666
logger.clearBuffer();
6767

@@ -71,7 +71,7 @@ const fastifyAwsPowertoolsLogger: FastifyPluginAsync<
7171
}
7272
};
7373

74-
const onErrorHandler = (error: unknown) => {
74+
const onErrorHandler = async (error: unknown) => {
7575
for (const logger of loggers) {
7676
if (options.flushBufferOnUncaughtError) {
7777
logger.flushBuffer();

src/metrics/plugins/metrics.plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const fastifyAwsPowertoolsMetrics: FastifyPluginAsync<
6060
setCleanupFunction(request);
6161
};
6262

63-
const onResponseOrErrorHandler = () => {
63+
const onResponseOrErrorHandler = async () => {
6464
for (const metric of metrics) {
6565
metric.publishStoredMetrics();
6666
}

0 commit comments

Comments
 (0)