{"id":21700383,"url":"https://github.com/articulate/paperplane-bugsnag","last_synced_at":"2025-03-20T15:43:00.044Z","repository":{"id":57098956,"uuid":"146900088","full_name":"articulate/paperplane-bugsnag","owner":"articulate","description":"A bugsnag wrapper for paperplane","archived":false,"fork":false,"pushed_at":"2019-10-14T16:52:16.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":57,"default_branch":"master","last_synced_at":"2024-04-29T21:23:25.994Z","etag":null,"topics":["bugsnag","error-reporting","exception-reporting","javascript","notifier","paperplane"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/articulate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-31T14:07:15.000Z","updated_at":"2021-02-11T18:41:15.000Z","dependencies_parsed_at":"2022-08-20T17:31:32.353Z","dependency_job_id":null,"html_url":"https://github.com/articulate/paperplane-bugsnag","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/articulate%2Fpaperplane-bugsnag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/articulate%2Fpaperplane-bugsnag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/articulate%2Fpaperplane-bugsnag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/articulate%2Fpaperplane-bugsnag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/articulate","download_url":"https://codeload.github.com/articulate/paperplane-bugsnag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244644921,"owners_count":20486889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bugsnag","error-reporting","exception-reporting","javascript","notifier","paperplane"],"created_at":"2024-11-25T20:14:11.125Z","updated_at":"2025-03-20T15:43:00.022Z","avatar_url":"https://github.com/articulate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  paperplane-bugsnag\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  A \u003ca href=\"https://github.com/bugsnag/bugsnag-node\"\u003e\u003ccode\u003ebugsnag\u003c/code\u003e\u003c/a\u003e wrapper for \u003ca href=\"https://github.com/articulate/paperplane\"\u003e\u003ccode\u003epaperplane\u003c/code\u003e\u003c/a\u003e.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/paperplane-bugsnag\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/paperplane-bugsnag.svg\" alt=\"npm version\" style=\"max-width:100%;\"\u003e\u003c/a\u003e \u003ca href=\"https://www.npmjs.com/package/paperplane-bugsnag\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/paperplane-bugsnag.svg\" alt=\"npm downloads\" style=\"max-width:100%;\"\u003e\u003c/a\u003e \u003ca href=\"https://travis-ci.org/articulate/paperplane-bugsnag\"\u003e\u003cimg src=\"https://travis-ci.org/articulate/paperplane-bugsnag.svg?branch=master\" alt=\"Build Status\" style=\"max-width:100%;\"\u003e\u003c/a\u003e \u003ca href='https://coveralls.io/github/articulate/paperplane-bugsnag?branch=v2'\u003e\u003cimg src='https://coveralls.io/repos/github/articulate/paperplane-bugsnag/badge.svg?branch=v2' alt='Coverage Status' /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Filters `Boom` client errors (4xx) and `Joi` validation errors by default, and adds request data to the error notification for debugging.\n\u003c/p\u003e\n\n## Usage\n\nSetup your `bugsnag` like this:\n\n```js\n// server/lib/bugsnag.js\n\nconst bugsnag = require('bugsnag')\n\nconst bugsnagClient = bugsnag({\n  apiKey: process.env.BUGSNAG_API_KEY,\n  notifyReleaseStages: ['prod', 'stage'],\n  releaseStage: process.env.SERVICE_ENV\n})\n\nconst optionalCustomLogger =\n  err =\u003e console.error(`My custom logged error: ${err.message}`)\n\nmodule.exports = require('paperplane-bugsnag')(bugsnagClient, optionalCustomLogger)\n```\n\nThen use it as the `cry` option in `paperplane` like this:\n\n```js\n// server/index.js\n\nconst http = require('http')\nconst { mount } = require('paperplane')\n\nconst app = require('./rest')\nconst cry = require('./lib/bugsnag').notify\n\nhttp.createServer(mount({ app, cry })).listen(3000, cry)\n```\n\nBy default, `Boom` client errors (4xx) and `Joi` validitation errors will be ignored.\n\n```js\n// server/rest.js\nmodule.exports = req =\u003e {\n  const err = Boom.badRequest()\n  return Promise.reject(err) // does not send notification\n}\n```\n\nWe can force a notification by setting `cry=true` on the error.\n\n```js\n// server/rest.js\nmodule.exports = req =\u003e {\n  const err = Boom.badRequest()\n  err.cry = true\n  return Promise.reject(err) // sends notification\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farticulate%2Fpaperplane-bugsnag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farticulate%2Fpaperplane-bugsnag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farticulate%2Fpaperplane-bugsnag/lists"}