Skip to content

Commit

Permalink
Report reason an attempt exhausted (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjus authored May 5, 2018
1 parent 8dc845f commit 26413c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,7 @@ class Hydra extends EventEmitter {
.catch((err) => {
instanceList.shift();
if (instanceList.length === 0) {
this.emit('metric', `service:unavailable|${instance.serviceName}|${instance.instanceID}|${err.message}`);
this.emit('metric', `service:unavailable|${instance.serviceName}|${instance.instanceID}|attempts:exhausted`);
resolve(this._createServerResponseWithReason(ServerResponse.HTTP_SERVICE_UNAVAILABLE, `An instance of ${instance.serviceName} is unavailable`));
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hydra",
"version": "1.6.5",
"version": "1.6.6",
"license": "MIT",
"author": "Carlos Justiniano",
"contributors": "https://github.com/flywheelsports/hydra/graphs/contributors",
Expand Down

0 comments on commit 26413c6

Please sign in to comment.