Skip to content

Commit

Permalink
fix: don't destroy if pipeline throws an error
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Sep 19, 2023
1 parent 2bf1f4d commit ed58ad1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ export const getRequestListener = (fetchCallback: FetchCallback) => {
} catch (e: unknown) {
// try to catch any error, to avoid crash
console.error(e)
const err = e instanceof Error ? e : new Error('unknown error', { cause: e })
// destroy error must accept an instance of Error
outgoing.destroy(err)
}
} else {
outgoing.end()
Expand Down

0 comments on commit ed58ad1

Please sign in to comment.