FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

nucleode/interference: Custom error factory for microservices with http code and internal type props · GitHub

This repository was archived by the owner on Jun 20, 2023. It is now read-only.
/ interference Public archive

Repository files navigation

Custom error factory for microservices with HTTP code and internal type props Edit

Install

npm install interference

Usage

import Interference, { isInterference } from 'interference'

const err = Interference({ message: 'Good news everyone', type: 'FUTURAMA' })

if (isInterference(err) && err.type === 'FUTURAMA') {
  console.log('We have a special delivery today')
}

Factory Signature

({ message: string, type?: string, details?: any, code?: number }): Interference

Referenct to < es6 target

Extending built-ins Error

About

Custom error factory for microservices with http code and internal type props

Topics

Resources

Code of conduct

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL