2.0.6 • Published 3 years ago

@taktikal/error-utils v2.0.6

Weekly downloads
13
License
ISC
Repository
gitlab
Last release
3 years ago

Error Utilities

Get started

Install

npm i -S @taktikal/error-utils

Server side usage

import { parseError } from "@taktikal/error-utils";
import ravenServer from "@taktikal/raven/server";

try {
  // ...
} catch (e) {
  const err = parseError(e, { req });
  ravenServer.captureException(err.originalError, { level: "critical" });
  res.status(500).send(err);
}

Client side usage

import { parseError } from "@taktikal/error-utils";

try {
  // ...
} catch (e) {
  const err = parseError(e);
  if (err.originalError) {
    ravenClient.captureException(err.originalError, { level: "critical" });
  }
}
2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago