Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Commit

Permalink
Ignore exception catch code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbreen committed Apr 4, 2015
1 parent c47bd8f commit 7ec7608
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/proxy/mutators/oauth_param_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ module.exports = function(proxy) {
proxy.logger.info(module_tag, "Proxying %s %s%s, consumer key %s", req.method, req.headers.host, req.url, consumer_key);
return next();

} catch (e) /* istanbul ignore next */ {
} catch (e) {
/* istanbul ignore next */
if (proxy && proxy.logger)
proxy.logger.error(module_tag, "Failed to handle request %s %s%s due to %s:\n%s", req.method, req.headers.host, req.url, e, e.stack);
/* istanbul ignore next */
res.writeHead(500, 'Internal error');
/* istanbul ignore next */
return res.end();
}
};
Expand Down

0 comments on commit 7ec7608

Please sign in to comment.