Skip to content

Commit

Permalink
Merge pull request #10 from podium-lib/error-listeners
Browse files Browse the repository at this point in the history
Add error event listeners on all metric streams
  • Loading branch information
trygve-lie authored Mar 5, 2019
2 parents 0d9d141 + d6f12d8 commit 2f8f623
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ const PodiumProxy = class PodiumProxy {
value: pathRegex(regExPath, this.pathnameEntries),
});

this.metrics.on('error', error => {
this.log.error('Error emitted by metric stream in @podium/proxy module', error);
});

this.proxy.on('error', error => {
this.log.error(error);
this.log.error('Error emitted by proxy in @podium/proxy module', error);
});

this.proxy.on('proxyReq', (proxyReq, req, res) => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
"ttl-mem-cache": "4.0.2"
},
"devDependencies": {
"eslint": "^5.14.1",
"eslint": "^5.15.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-prettier": "^4.0.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^3.0.0",
"jest": "^24.1.0",
"prettier": "^1.14.2",
"readable-stream": "^3.1.1"
"readable-stream": "^3.2.0"
},
"jest": {
"coveragePathIgnorePatterns": [
Expand Down

0 comments on commit 2f8f623

Please sign in to comment.