Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

levee

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levee - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

4

CHANGELOG.md

@@ -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 @@

4

lib/breaker.js

@@ -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`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc