# amk-error

> http response error object for amk js

Latest version **0.1.0** (published 2017-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install amk-error
pnpm add amk-error
yarn add amk-error
bun add amk-error
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-09-17 |
| First published | 2017-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | heinrich10 |
| Maintainers | heinrich10 |

## Links

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

## Recent versions

- 0.1.0 (latest) — 2017-09-17

## README

# AMK-ERROR

[![CircleCI](https://circleci.com/gh/amkjs/amk-error.svg?style=svg)](https://circleci.com/gh/amkjs/amk-error)
[![codecov](https://codecov.io/gh/amkjs/amk-error/branch/master/graph/badge.svg)](https://codecov.io/gh/amkjs/amk-error)
[![Known Vulnerabilities](https://snyk.io/test/github/amkjs/amk-error/badge.svg?targetFile=package.json)](https://snyk.io/test/github/amkjs/amk-error?targetFile=package.json)


http response error object for amk js

## Usage

to install: `npm i amk-error`

to use:
```
const ErrorObject = require('amk-error');

throw new ErrorObject('Not found', 404);
```

## API

#### ```constructor(message, status)```
---
Creating an error object

##### Arguments
* **message** **_(string)_** - message regarding the error (default: Something went wrong)
* **status** **_(number)_** - http status code, will only accept 400 to 599. (default is 500)

## Tests
1. install dependencies using `npm install`
2. run `npm test`

## Feedback

All bugs, feature requests, pull requests, feedback, etc., are welcome. [Create an issue](https://github.com/amkjs/amk-error/issues).

## License
[MIT](https://github.com/amkjs/amk-error/blob/master/LICENSE)

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