   setProto res, Response
 
   # The default 404 response handler.
-  req.next = handle404
+  req.next = default404.bind req, res
 
   # Prevent long-running requests.
   if app._timeout > 0


  _timeout: options.timeout

  _onError: options.onError or handle500

# The root request handler.
onRequest = (req, res) ->

    return

# Attached to the request object.
default404 = (res) ->
  res.status 404
  res.send {error: "Nothing exists here. Sorry!"}
  return

# The default handler when the server throws an error.
default500 = (error, res) ->

  log.moat 1
  log.white error.stack
