# is-system-error

> A validator to check if the error is one of the system errors encountered when writing a Node.js program

Latest version **1.6.0** (published 2017-05-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-system-error
pnpm add is-system-error
yarn add is-system-error
bun add is-system-error
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2017-05-23 |
| First published | 2017-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gaurav Luthra |
| Maintainers | gluthra |
| Keywords | error, is error, is system error, is-system-error, system error, system-error, exception |

## Links

- npm: https://www.npmjs.com/package/is-system-error
- Repository: https://github.com/luthraG/is-system-error
- Homepage: https://github.com/luthraG/is-system-error#readme
- Issues: https://github.com/luthraG/is-system-error/issues
- npm.io page: https://npm.io/package/is-system-error

## Dependencies (1)

- [node-ratify](https://npm.io/package/node-ratify.md) ~1.1.2

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.6.0 (latest) — 2017-05-23
- 1.4.0 — 2017-05-23
- 1.3.0 — 2017-05-23
- 1.2.0 — 2017-05-23
- 1.1.0 — 2017-05-23
- 1.0.0 — 2017-05-23

## README

# is-system-error

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]

Checks if the error is one of the system errors encountered when writing a Node.js program

### Server-side usage

```javascript
var IS_SYSTEM_ERROR = require('is-system-error');

IS_SYSTEM_ERROR.isSystemError(new Error()); //=> false

var error = new Error();
error.code = 'ECONNRESET';

IS_SYSTEM_ERROR.isSystemError(error); //=> true
```

The library can also be installed through [npm][npm]

```bash
$ npm install -g is-system-error
$ npm install --save is-system-error
```

### Clone the repo

```bash
$ git clone https://github.com/luthraG/is-system-error.git
```

### API

#### isSystemError(obj)

Given a object this API checks if it is system error or not

**Example**

```javascript
var IS_SYSTEM_ERROR = require('is-system-error');

IS_SYSTEM_ERROR.isSystemError(new Error()); //=> false

var error = new Error();
error.code = 'ECONNRESET';

IS_SYSTEM_ERROR.isSystemError(error); //=> true


var error = new Error();
error.code = 'EMFILE';

IS_SYSTEM_ERROR.isSystemError(error); //=> true

```

### Author

**Gaurav Luthra**

* [github/luthraG](https://github.com/luthraG)


### License(MIT)

```
Copyright (c) 2017 Gaurav Luthra <luthra.zenith@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

[npm-url]: https://www.npmjs.com/package/is-system-error
[npm-image]: https://img.shields.io/npm/v/is-system-error.svg

[npm]: https://www.npmjs.com/

[travis-url]: https://travis-ci.org/luthraG/is-system-error
[travis-image]: http://img.shields.io/travis/luthraG/is-system-error.svg

---
_Source: https://npm.io/package/is-system-error · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
