Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bugsnag/delivery-electron

Package Overview
Dependencies
Maintainers
9
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/delivery-electron - npm Package Compare versions

Comparing version 7.19.0 to 7.22.1

38

delivery.js

@@ -8,10 +8,30 @@ const { createHash } = require('crypto')

const delivery = (client, filestore, net, app) => {
const noop = () => {}
const send = (opts, body, cb) => {
const errorHandler = err => {
err.isRetryable = true
cb(err)
let errorCallback = (error, response) => {
// an error can still happen on both the request and response even after a response is received,
// so we noop on subsequent calls to ensure this is only handled once
errorCallback = noop
if (response) {
error.isRetryable = isRetryable(response.statusCode)
// do not retry oversized payloads regardless of status code
if (body.length > 10e5) {
client._logger.warn(`Discarding over-sized event (${(body.length / 10e5).toFixed(2)} MB) after failed delivery`)
error.isRetryable = false
}
} else {
error.isRetryable = true
}
cb(error)
}
const req = net.request(opts, response => {
req.removeListener('error', errorHandler)
// handle errors on the response stream
response.on('error', err => {
errorCallback(err, response)
})
if (isOk(response)) {

@@ -21,13 +41,7 @@ cb(null)

const err = new Error(`Bad status code from API: ${response.statusCode}`)
err.isRetryable = isRetryable(response.statusCode)
// do not retry oversized payloads regardless of status code
if (body.length > 10e5) {
client._logger.warn(`Discarding over-sized event (${(body.length / 10e5).toFixed(2)} MB) after failed delivery`)
err.isRetryable = false
}
cb(err)
errorCallback(err, response)
}
})
req.on('error', errorHandler)
req.on('error', err => errorCallback(err))

@@ -34,0 +48,0 @@ try {

{
"name": "@bugsnag/delivery-electron",
"version": "7.19.0",
"version": "7.22.1",
"main": "delivery.js",

@@ -28,3 +28,3 @@ "description": "@bugsnag/electron delivery mechanism to send events, sessions, and crash dumps from Electron apps",

},
"gitHead": "95d2c3dd978e7dc5a6fda5664cfa9cf437b03b76"
"gitHead": "73cb5c474b6134a3a0c367d8abc3991c25d9d443"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc