# @hypercolor/http-errors

> Custom HTTP Error Class used by the team at Hypercolor to provide consistent HTTP Error formatting between services for a given project.

Latest version **0.0.1** (published 2023-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hypercolor/http-errors
pnpm add @hypercolor/http-errors
yarn add @hypercolor/http-errors
bun add @hypercolor/http-errors
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-03-09 |
| First published | 2023-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 39.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Seth Uschuk |
| Maintainers | seth_hypercolor, andrew-hypercolor |
| Keywords | errors, http, error, error, class, custom, errors |

## Links

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

## Dependencies (1)

- [ts-custom-error](https://npm.io/package/ts-custom-error.md) ^3.3.1

## 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

- 0.0.1 (latest) — 2023-03-09

## README

# Hypercolor HTTP Errors

## Table of Contents
  - [Introduction](#introduction)
  - [Installation](#installation)
  - [Usage](#usage)
  - [License](LICENSE)
  - [More Information](#more-information)
    - [Project Repository](#project-repository)
    - [Organization Repository](#organization-repository)
    
## Introduction
This tool is used by the team at Hypercolor to provide consistent HTTP Error formatting between services for a given project.

## Installation
  - NPM 
    - `npm i @hypercolor/http-errors`
  - Yarn 
    - `yarn add @hypercolor/http-errors`
  
## Usage
Example:
```typescript
import { NotFoundError } from '@hypercolor/http-errors';

export class Service {
    public async findSomething(id: number) {
        const found = await this.findSomething(id);
        if (!found) {
            throw new NotFoundError('Something not found with ID: ' + id);
        }
        return found;
    }
}

```
## More Information

#### [Project Repository](https://github.com/hypercolor/http-errors)

#### [Organization Repository](https://github.com/hypercolor/)

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