# @yo1dog/http-response-error

> HTTP Response Error

Latest version **1.0.2** (published 2019-10-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install @yo1dog/http-response-error
pnpm add @yo1dog/http-response-error
yarn add @yo1dog/http-response-error
bun add @yo1dog/http-response-error
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-10-20 |
| First published | 2019-10-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mike "yo1dog" Moore |
| Maintainers | yo1dog |

## Links

- npm: https://www.npmjs.com/package/@yo1dog/http-response-error
- Repository: https://github.com/yo1dog/node-http-response-error
- Homepage: https://github.com/yo1dog/node-http-response-error#readme
- Issues: https://github.com/yo1dog/node-http-response-error/issues
- npm.io page: https://npm.io/package/@yo1dog/http-response-error

## Dependencies (1)

- [@yo1dog/extendable-error](https://npm.io/package/@yo1dog/extendable-error.md) ^1.0.2

## Recent versions

- 1.0.2 (latest) — 2019-10-20
- 1.0.1 — 2019-10-20
- 1.0.0 — 2019-10-20

## README

# http-response-error

HTTP Response Error

## Quick Start

```javascript
const HTTPResponseError = require('@yo1dog/http-response-error');

const res = await request('https://www.example.com/fubar');
if (res.statusCode !== 200) {
  throw new HTTPResponseError(res, `Unable to get fubar.`);
}
```


# Docs

## `new HTTPResponseError(res, [message])`

 param    | type     | description
----------|----------|-------------
`res`     | Response | Response object.
`message` | string   | A human-readable description of the error.


-----

## `HTTPResponseError.status`

## `HTTPResponseError.bodyObj`

## `HTTPResponseError.bodyStr`

## `HTTPResponseError.res`

## `HTTPResponseError.req`

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