transient-error
v1.0.0
Published
Mark an error as transient, meaning you can retry
Downloads
7,060
Maintainers
Readme
transient-error
Mark an error as transient, meaning you can retry.
Usage
const transient = require('transient-error')
const err = transient(new Error('Could not connect'))
A consumer can then do:
if (err.transient) {
// Retry
}
Becomes useful when multiple modules use this, as a simple contract.
Install
With npm do:
npm install transient-error
License
MIT © 2020-present Vincent Weevers