# connect-domain

> Asynchronous error handler for Connect

Latest version **0.5.0** (published 2013-03-13) · 0 weekly downloads

## Install

```sh
npm install connect-domain
pnpm add connect-domain
yarn add connect-domain
bun add connect-domain
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2013-03-13 |
| First published | 2012-08-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 84 |
| Author | Vadim M. Baryshev |
| Maintainers | baryshev |
| Keywords | domain, error, connect |

## Links

- npm: https://www.npmjs.com/package/connect-domain
- Repository: https://github.com/baryshev/connect-domain
- npm.io page: https://npm.io/package/connect-domain

## 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.5.0 (latest) — 2013-03-13
- 0.4.1 — 2013-01-01
- 0.4.0 — 2013-01-01
- 0.3.1 — 2012-12-26
- 0.3.0 — 2012-12-09
- 0.2.0 — 2012-12-07
- 0.1.0 — 2012-08-11

## README

# About 

Asynchronous error handler for Connect

# Installation

	npm install connect-domain

# Usage

```js
var
	connect = require('connect'),
	connectDomain = require('connect-domain');

var app = connect()
	.use(connectDomain())
	.use(function(req, res){
		if (Math.random() > 0.5) {
			throw new Error('Simple error');
		}
		setTimeout(function() {
			if (Math.random() > 0.5) {
				throw new Error('Asynchronous error from timeout');
			} else {
				res.end('Hello from Connect!');
			}
		}, 1000);
	})
	.use(function(err, req, res, next) {
		res.end(err.message);
	});

app.listen(3000);
```

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