# @mariusc23/micro-error-handler

> Error handler middleware for micro.

Latest version **3.0.0** (published 2017-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mariusc23/micro-error-handler
pnpm add @mariusc23/micro-error-handler
yarn add @mariusc23/micro-error-handler
bun add @mariusc23/micro-error-handler
```

## 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 | 3.0.0 |
| Published | 2017-10-16 |
| First published | 2017-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marius Craciunoiu |
| Maintainers | mariusc23 |
| Keywords | micro |

## Links

- npm: https://www.npmjs.com/package/@mariusc23/micro-error-handler
- Repository: https://github.com/mariusc23/micro-error-handler
- Homepage: https://github.com/mariusc23/micro-error-handler#readme
- Issues: https://github.com/mariusc23/micro-error-handler/issues
- npm.io page: https://npm.io/package/@mariusc23/micro-error-handler

## Recent versions

- 3.0.0 (latest) — 2017-10-16
- 2.0.0 — 2017-08-04
- 1.2.0 — 2017-03-31
- 1.1.0 — 2017-03-31
- 1.0.0 — 2017-03-30

## README

# micro-error-handler

> Error handler middleware for [micro](https://github.com/zeit/micro).

## Installation

    npm install --save @mariusc23/micro-error-handler

## Usage

```js
const { applyMiddleware } = require('@mariusc23/micro-middleware')
const { errorHandler } = require('@mariusc23/micro-error-handler')

module.exports = applyMiddleware([errorHandler], async (req, res) => {
  return 'Hello world'
})
```

## Example Response

```json
{
  "error": {
    "code": 500,
    "message": "Unknown Error"
  }
}
```

## License

Copyright (c) 2017 Marius Craciunoiu. Licensed under the MIT license.

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