# ozylog-http-errors

> Create HTTP error objects

Latest version **1.0.11** (published 2017-08-28) · SEE LICENSE IN LICENSE license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ozylog-http-errors
pnpm add ozylog-http-errors
yarn add ozylog-http-errors
bun add ozylog-http-errors
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2017-08-28 |
| First published | 2016-12-29 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cahya Pribadi |
| Maintainers | cahyap |
| Keywords | ozylog, http, error |

## Links

- npm: https://www.npmjs.com/package/ozylog-http-errors
- Repository: https://github.com/ozylog/ozylog-http-errors
- Homepage: https://github.com/ozylog/ozylog-http-errors#readme
- Issues: https://github.com/ozylog/ozylog-http-errors/issues
- npm.io page: https://npm.io/package/ozylog-http-errors

## 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.0.11 (latest) — 2017-08-28
- 1.0.10 — 2017-03-07
- 1.0.9 — 2017-03-07
- 1.0.8 — 2017-02-07
- 1.0.7 — 2017-02-07
- 1.0.6 — 2017-02-03
- 1.0.5 — 2017-02-03
- 1.0.4 — 2017-02-03
- 1.0.3 — 2017-01-03
- 1.0.2 — 2017-01-03
- 1.0.1 — 2016-12-30
- 1.0.0 — 2016-12-29

## README

# ozylog-http-errors

## THIS MODULE IS NO LONGER MAINTAINED. Please use [@ozylog/http-errors](https://www.npmjs.com/package/@ozylog/http-errors) instead.

Create HTTP error objects

[![Travis](https://img.shields.io/travis/ozylog/ozylog-http-errors.svg?style=flat-square)](https://travis-ci.org/ozylog/ozylog-http-errors) [![npm](https://img.shields.io/npm/dt/ozylog-http-errors.svg?style=flat-square)](https://www.npmjs.com/package/ozylog-http-errors)

## Installation

```
npm install ozylog-http-errors --save
```

## List of errors
```
- BadRequestError([message = 'Bad Request'])
- ForbiddenError([message = 'Forbidden'])
- InternalServerError([message = 'Internal Server Error'])
- NotAcceptableError([message = 'Not Acceptable'])
- NotFoundError([message = 'Not Found'])
- NotImplementedError([message = 'Not Implemented'])
- UnauthorizedError([message = 'Unauthorized'])
- CreateError([message], [responseCode])
```

## Usage Example
```javascript
import {BadRequestError} from 'ozylog-http-errors';

export function validate(req, res, next) {
  if (!req.body.name) return next(new BadRequestError());
}
```

## License
MIT

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