Adding a verbose option to the API middleware.

Constructor now accepts an optional 'verbose' boolean which causes the middleware to return an exception's trace array to assist in debugging.