Skip to content

Commit 7c7175a

Browse files
authored
fix(node): Add error handling to koa snippet (#6665)
1 parent aac9d1f commit 7c7175a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/platforms/node/guides/koa/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ const requestHandler = (ctx, next) => {
7777
)
7878
);
7979

80-
await next();
80+
try {
81+
await next();
82+
} catch (err) {
83+
reject(err);
84+
}
8185
resolve();
8286
});
8387
});

0 commit comments

Comments
 (0)