# @dynatrace-sdk/error-handlers

> Customize the handling of the errors originating from the app.

Latest version **1.3.3** (published 2026-10-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @dynatrace-sdk/error-handlers
pnpm add @dynatrace-sdk/error-handlers
yarn add @dynatrace-sdk/error-handlers
bun add @dynatrace-sdk/error-handlers
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2026-10-26 |
| First published | 2023-01-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 30.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dynatrace-nodejs, stefan.wolfsteiner.dynatrace, wasserb |
| Keywords | Dynatrace AppEngine, error |

## Links

- npm: https://www.npmjs.com/package/@dynatrace-sdk/error-handlers
- Homepage: https://developer.dynatrace.com/reference/sdks/error-handlers/
- npm.io page: https://npm.io/package/@dynatrace-sdk/error-handlers

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

- 1.3.3 (latest) — 2026-10-26
- 1.3.2 — 2026-08-13
- 1.3.1 — 2024-01-08
- 1.3.0 — 2023-11-06
- 1.2.0 — 2023-10-24
- 1.1.1 — 2023-07-31
- 1.1.0 — 2023-04-24
- 1.0.0 — 2023-04-24
- 0.2.7 — 2023-03-14
- 0.2.5 — 2023-02-23
- 0.1.1 — 2023-01-27
- 0.1.0 — 2023-01-27

## README

# Error handlers

A Dynatrace AppEngine SDK library allowing to customize how the uncaught errors and rejected promises originating from the app are handled by the AppEngine.

```cmd
npm install @dynatrace-sdk/error-handlers
```

### Example usage

```typescript
import {
  ErrorType,
  HttpSerializedError,
  addGlobalErrorSerializer,
} from '@dynatrace-sdk/error-handlers';

class CustomHttpError {
  constructor(
    readonly status: number,
    readonly name: string,
    readonly message: string,
  ) {}
}

addGlobalErrorSerializer(async (error) => {
  if (error instanceof CustomHttpError) {
    return <HttpSerializedError>{
      type: ErrorType.HTTP,
      name: error.name,
      status: error.status,
      message: error.message,
    };
  }
});
```

### API reference

See the package reference in the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/error-handlers/).

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