# joi-http-errors

> Joi error handler with http errors

Latest version **0.0.1** (published 2018-01-04) · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2018-01-04 |
| First published | 2018-01-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | geraldhart100 |

## Links

- npm: https://www.npmjs.com/package/joi-http-errors
- npm.io page: https://npm.io/package/joi-http-errors

## Dependencies (1)

- [http-errors](https://npm.io/package/http-errors.md) ^1.6.2

## Recent versions

- 0.0.1 (latest) — 2018-01-04

## README

# joi-http-errors

Joi error handler with http errors

## Usage

```js
const Joi = require('joi')

const errorHandler = require('@local/joi-http-errors')

const schema = Joi.object({ email: Joi.string().email() })

schema
  .validate({ email: '@exo' })
  .catch(err => {
    // err.status = 422
    // err.source = { path, type, ... }
  })

```

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