Skip to content

Commit

Permalink
Better error message on completely uncaught errors within the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed May 1, 2023
1 parent 59f2384 commit a159212
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/integrations/node/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ async function writeWebResponse(app: NodeApp, res: ServerResponse, webResponse:
res.write(chunk);
}
} catch(err: any) {
res.write(err + '');
console.error(err?.stack || err?.message || String(err))
res.write('Internal server error');
}
}
res.end();
Expand Down

0 comments on commit a159212

Please sign in to comment.