open-index/open-npm huggingface dataset:
npm package: @nitrotool/errors
Description: Reusable error utilities for H3-based applications.   This package provides a collection of typed error helpers that create `H3Error` instances with standardized HTTP status codes and messages.
Latest version: 1.0.5

# @nitrotool/errors

Reusable error utilities for H3-based applications.  
This package provides a collection of typed error helpers that create `H3Error` instances with standardized HTTP status
codes and messages.

## Installation

```bash
pnpm install @nitrotool/errors
```

```bash
npm install @nitrotool/errors
```

## Usage

```ts
import {
    UnauthenticatedError,
    UnauthorizedError,
    NotFoundError,
    EntityAlreadyExistsError,
    ServerError,
    ClientError,
    UnprocessableEntityError,
    BadRequestError,
} from '@nitrotool/errors';

// Example in an API handler
export default defineEventHandler((event) => {
    const authHeader = getHeader(event, 'authorization');
    if (!authHeader) {
        throw UnauthenticatedError('Missing auth token');
    }

    if (!isUserAllowed(authHeader)) {
        throw UnauthorizedError('You do not have access to this resource');
    }

// ...
});
```

## API

| Function                     | Status Code | Status Message            |
|------------------------------|-------------|---------------------------|
| `UnauthenticatedError`     | `401`     | `Unauthenticated`       |
| `UnauthorizedError`        | `403`     | `Unauthorized`          |
| `NotFoundError`            | `404`     | `Not found`             |
| `EntityAlreadyExistsError` | `409`     | `Entity Already Exists` |
| `ClientError`              | `400`     | `Client Error`          |
| `BadRequestError`          | `400`     | `Bad Request`           |
| `UnprocessableEntityError` | `422`     | `Unprocessable Entity`  |
| `ServerError`              | `500`     | `Internal Server Error` |

## Development

Build the package:

```bash
pnpm build
```

The package uses [unbuild](https://github.com/unjs/unbuild) for generating `dist/` with both `index.mjs` and type
definitions.

## License

MIT
npm package: @nitwel/directus-marketplace
Description: Directus Marketplace Components
Author: Nils Twelker
Latest version: 1.0.14

# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# yarn
yarn install

# npm
npm install

# pnpm
pnpm install --shamefully-hoist
```

## Development Server

Start the development server on http://localhost:3000

```bash
npm run dev
```

## Production

Build the application for production:

```bash
npm run build
```

Locally preview production build:

```bash
npm run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.