Skip to content

Commit d3f958b

Browse files
authored
Merge pull request #97 from epsmith001/elismith/improve-stack-trace-433543
refactor: Use await so the handler appears in the stack trace on error
2 parents ba718e2 + d06e68c commit d3f958b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export {
2727
* ```
2828
*/
2929
export function createAsyncHandler(app: Application): (event: RequestEvent, context: Context) => Promise<ResponseResult> {
30-
return (event: RequestEvent, context: Context): Promise<ResponseResult> => {
31-
return app.runAsync(event, context);
30+
return async (event: RequestEvent, context: Context): Promise<ResponseResult> => {
31+
return await app.runAsync(event, context);
3232
};
3333
}
3434

0 commit comments

Comments
 (0)