Skip to content

Instantly share code, notes, and snippets.

@Vehmloewff
Last active November 24, 2021 01:25
Show Gist options
  • Save Vehmloewff/775e44186cb2732523f1b0ecafbc9788 to your computer and use it in GitHub Desktop.
Save Vehmloewff/775e44186cb2732523f1b0ecafbc9788 to your computer and use it in GitHub Desktop.
Errors thrown inside http.serve disappear
import { serve } from 'https://deno.land/[email protected]/http/mod.ts'
const listener = Deno.listen({ port: 3000 })
await serve(listener, () => {
console.log('before throw')
throw new Error('whoa! this does not print')
console.log('after throw')
return new Response('hello world')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment