Skip to content

Instantly share code, notes, and snippets.

@Vehmloewff
Last active November 24, 2021 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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/std@0.113.0/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