error-monkey

An event emitter that emits error events for use in testing your server for resilience.

Usage no npm install needed!

<script type="module">
  import errorMonkey from 'https://cdn.skypack.dev/error-monkey';
</script>

README

error-monkey

Build Status Coverage Status

An event emitter that emits error events for use in testing your server for resilience.

Basic usage:

var errorMonkey = require('error-monkey');
errorMonkey(30, 0.5);  
  // ^^^ every 30 seconds, there's a 50% chance of error

You can drop error-monkey at different places in your code to make sure that your server can gracefully restart in the case of uncaught error events.

You want a graceful restart so that outstanding connections are not unceremoniously dropped.