@taktikal/error-utils
Error utilities for Taktikal
Last updated a year ago by bjark .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @taktikal/error-utils 
SYNC missed versions from official npm registry.

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" });
  }
}

Current Tags

  • 2.0.6                                ...           latest (a year ago)

10 Versions

  • 2.0.6                                ...           a year ago
  • 2.0.5                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 11
Dependencies (4)
Dev Dependencies (14)

Copyright 2014 - 2016 © taobao.org |