New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cloudant/couchbackup

Package Overview
Dependencies
Maintainers
0
Versions
517
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudant/couchbackup - npm Package Compare versions

Comparing version 2.11.1-SNAPSHOT-264 to 2.11.1-SNAPSHOT-265

26

includes/request.js

@@ -1,2 +0,2 @@

// Copyright © 2017, 2021 IBM Corp. All rights reserved.
// Copyright © 2017, 2024 IBM Corp. All rights reserved.
//

@@ -40,4 +40,3 @@ // Licensed under the Apache License, Version 2.0 (the "License");

// Override the status text with an improved message
let errorMsg = `${err.response.status} ${err.response.statusText || ''}: ` +
`${method} ${requestUrl}`;
let errorMsg = `${err.response.status} ${method} ${requestUrl}`;
if (err.response.data) {

@@ -48,19 +47,14 @@ debug('Found response data');

debug('Response data is JSON');
// Append the error/reason if available
if (err.response.data.error) {
debug('Augmenting error message with error property');
// Override the status text with our more complete message
errorMsg += ` - Error: ${err.response.data.error}`;
if (err.response.data.reason) {
debug('Augmenting error message with reason property');
errorMsg += `, Reason: ${err.response.data.reason}`;
}
// Append the 'errors' message if available
if (err.response.data.errors && err.response.data.errors.length > 0) {
const originalError = err.response.data.errors[0];
originalError.message = `${errorMsg} - Error: ${originalError.message}`;
}
} else {
errorMsg += err.response.data;
// Set a new message for use by the node-sdk-core
// We use the errors array because it gets processed
// ahead of all other service errors.
err.response.data.errors = [{ message: errorMsg }];
}
// Set a new message for use by the node-sdk-core
// We use the errors array because it gets processed
// ahead of all other service errors.
err.response.data.errors = [{ message: errorMsg }];
}

@@ -67,0 +61,0 @@ } else if (err.request) {

{
"name": "@cloudant/couchbackup",
"version": "2.11.1-SNAPSHOT-264",
"version": "2.11.1-SNAPSHOT-265",
"description": "CouchBackup - command-line backup utility for Cloudant/CouchDB",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/IBM/couchbackup",

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