// config/http.js

var Raven = require('raven');

module.exports.http = {
  middleware: {
    // Raven's handlers has to be added as a keys to http.middleware config object
    requestHandler: Raven.requestHandler(),
    errorHandler: Raven.errorHandler(),

    // And they have to be added in a correct order to middlewares list
    order: [
      // The request handler must be the very first one
      // ...more middlewares
      // The error handler must be after router, but before any other error middleware
      /// ...remaining middlewares
In this guide