michaelleeallen / reducto

A small module that aims to reduce the amount of code needed to create apps with a distributed back end in express.js

Home Page:http://michaelleeallen.github.io/reducto/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add config detail to errors

michaelleeallen opened this issue · comments

When calling next(error) we should place the route/service details in the error so that the calling app can have more information about which route/service actually failed.

Something like:

...
.catch((e) => {
  e.routeInfo = {
    uri: requestConfig.uri,
    method: requestConfig.method
  };
  next(e);
});