Comparing version 1.2.1 to 1.3.0
@@ -0,1 +1,5 @@ | ||
## v1.3.0 | ||
- Add custom error message for timeout and circuit open | ||
- https://github.com/krakenjs/levee/pull/14 | ||
## v1.2.1 | ||
@@ -2,0 +6,0 @@ |
@@ -74,3 +74,3 @@ 'use strict'; | ||
this.emit('reject'); | ||
callback(new Error('Command not available.')); | ||
callback(new Error(this.settings.openErrMsg || 'Command not available.')); | ||
return; | ||
@@ -93,3 +93,3 @@ } | ||
timer = setTimeout(function ontimeout() { | ||
var error = new Error('Command timeout.'); | ||
var error = new Error(self.settings.timeoutErrMsg || 'Command timeout.'); | ||
error.name = 'commandTimeout'; | ||
@@ -96,0 +96,0 @@ error.code = 'ETIMEDOUT'; |
{ | ||
"name": "levee", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "A circuitbreaker implementation for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -142,2 +142,8 @@ Levee | ||
##### `timeoutErrMsg` | ||
Custom error message to be used, for timeout error. | ||
##### `openErrMsg` | ||
Custom error message to be used, when circuit is open and command is not available. | ||
#### Properties | ||
@@ -144,0 +150,0 @@ ##### `fallback` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
15555
195