1.2.3 • Published 2 years ago

coderr.client v1.2.3

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
2 years ago

JavaScript library for Coderr

This library is currently available as a release candidate. Feel free to try it, and please give us feedback.

npm.io

https://coderr.io

This library supports NodeJS and the browser (es6 module). There are also integration libraries that pick up errors automatically from Express, Angular etc.

Installation

Download this package:

npm -I coderr.client

Add it to your application:

import { err } from "coderr.client";

err.configuration.credentials("https://reporting.coderr.io", "yourAppKey");

DOM errors will now automatically be reported (for browser-based applications).

To report errors:

import { err } from "coderr.client";

try {
    // Do something
    // or to just test:
    throw new Error("Something failed!");
}
catch (e) {
    // You can attach any kind of data.
    err.report(e, {userId: 11, address: { City: "Falun" }});
}

Configuration

Coderr detects the environment (production/development) automatically when running in node, for all other types of applications, specify it:

import { err } from "coderr.client";

err.configuration.environment = 'production';

Application version

To see which application version an error exist, specify it:

import { err } from "coderr.client";

err.configuration.applicationVersion = '1.1.3';

Example, integration library

You can, for instance, install the Express package:

npm -I coderr.client.expressjs

And then activate it:

import { err } from "coderr.client";
import { activatePlugin, errorMiddleware } from "coderr.client.expressjs";


activatePlugin(err.configuration);
err.configuration.credentials("https://coderr.io", "yourAppKey", "yourSharedSecret");

Finally, activate the error middleware as the last middleware:

app.use(errorMiddleware);
1.2.3

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.2.2

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.0-rc01

2 years ago

1.1.0-rc03

2 years ago

1.1.0-rc02

2 years ago

1.0.0

3 years ago

1.0.0-beta20

4 years ago

1.0.0-rc01

4 years ago

1.0.0-beta19

4 years ago

1.0.0-beta17

4 years ago

1.0.0-beta18

4 years ago

1.0.0-beta16

4 years ago

1.0.0-beta15

4 years ago

1.0.0-beta12

4 years ago

1.0.0-beta13

4 years ago

1.0.0-beta14

4 years ago

1.0.0-beta11

4 years ago

1.0.0-beta10

4 years ago

1.0.0-beta09

4 years ago

1.0.0-beta08

5 years ago