内容简介:Creates bug reports for uncaught exceptions and unhandled rejections. Works like a DYI Sentry client. Can publish bug reports on different trackers simultaneously.Registers event handlers for
unhandler
Creates bug reports for uncaught exceptions and unhandled rejections. Works like a DYI Sentry client. Can publish bug reports on different trackers simultaneously.
Install
$ npm install @tuplo/unhandler # or with yarn $ yarn add @tuplo/unhandler
Usage
import { unhandler } from '@tuplo/unhandler';
Registers event handlers for uncaughtException and unhandledRejection
unhandler({
appName: 'my-app-1',
providers: {
github: {
user: 'tuplo',
repo: 'unhandler',
token: 'secret-token-xxxxxxx',
},
},
});
throw new Error('buggy bug');
// will create a GitHub issue with title "[my-app-1] buggy bug"
Creates bug reports directly with submitError
import { submitError } from '@tuplo/unhandler';
const error = new Error('buggy bug');
await submitError(error, {
appName: 'my-app-1',
providers: {
github: {
user: 'tuplo',
repo: 'unhandler',
token: 'secret-token-xxxxxxx',
},
},
});
// will create a GitHub issue with title "[my-app-1] buggy bug"
Error tracking providers
- GitHub Issues
- Trello
- JIRA
API
unhandler(options)
options
appName: string
The name of the application triggering the error.
providers: Provider[]
GitHub
| name | type | description |
|---|---|---|
| user | string | The user or organization, owner of the repository where issues will be created. |
| repo | string | The name of the repository where issues will be created. |
| token | string | GitHub's personal access token with a repo scope. |
Contribute
Contributions are always welcome!
License
MIT
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
算法的陷阱
阿里尔•扎拉奇 (Ariel Ezrachi)、莫里斯•E. 斯图克 (Maurice E. Stucke) / 余潇 / 中信出版社 / 2018-5-1 / CNY 69.00
互联网的存在令追求物美价廉的消费者与来自世界各地的商品只有轻点几下鼠标的距离。这诚然是一个伟大的科技进步,但却也是一个发人深思的商业现象。本书中,作者扎拉奇与斯图克将引领我们对由应用程序支持的互联网商务做出更深入的检视。虽然从表面上看来,消费者确是互联网商务兴盛繁荣过程中的获益者,可精妙的算法与数据运算同样也改变了市场竞争的本质,并且这种改变也非总能带来积极意义。 首当其冲地,危机潜伏于计算......一起来看看 《算法的陷阱》 这本书的介绍吧!