Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thiagogarbazza/node-business-error

Create an instance representing an error for a business validation
https://github.com/thiagogarbazza/node-business-error

ecmascript error javascript nodejs nodejs-modules

Last synced: about 6 hours ago
JSON representation

Create an instance representing an error for a business validation

Awesome Lists containing this project

README

        

# node-business-error
[![Build Status](https://travis-ci.org/thiagogarbazza/node-business-error.svg?branch=master)](https://travis-ci.org/thiagogarbazza/node-business-error)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/thiagogarbazza/node-business-error/)

## Installation

### Using NPM

```sh
npm install --save business-error
```

## Usage

```js
const {BusinessCase, BusinessError} = require('business-error');

const businessCase = new BusinessCase('code', 'Any business validation message');
throw new BusinessError('a business error', businessCase);
```

## License

The `node-business-error` project is under MIT license.