Miss any of our Open RFC calls?Watch the recordings here! »

transient-error

1.0.0 • Public • Published

transient-error

Mark an error as transient, meaning you can retry.

npm status node Travis build status JavaScript Style Guide

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

Install

npm i transient-error

DownloadsWeekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.84 kB

Total Files

4

Last publish

Collaborators

  • avatar