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

@itentialopensource/adapter-utils

Package Overview
Dependencies
Maintainers
3
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itentialopensource/adapter-utils - npm Package Compare versions

Comparing version 4.30.6 to 4.30.7

10

CHANGELOG.md
## 4.30.7 [02-13-2020]
* add in a response that can be parsed
Closes ADAPT-89
See merge request itentialopensource/adapter-utils!162
---
## 4.30.6 [02-10-2020]

@@ -3,0 +13,0 @@

13

lib/restHandler.js

@@ -138,3 +138,8 @@ /* @copyright Itential, LLC 2018 */

try {
return callback(null, parser.toJson(retErrorObj, { object: true }));
// if we have a response, try to parse it to JSON
if (perror.response) {
retError = parser.toJson(perror.response, { object: true });
retErrorObj.response = retError;
}
return callback(null, retErrorObj);
} catch (ex) {

@@ -147,9 +152,9 @@ log.warn(`${origin}: Unable to parse json ${ex}`);

// process the error response - parse it if possible
if (perror.raw_response) {
if (perror.response) {
if (entitySchema && entitySchema.responseDatatype && entitySchema.responseDatatype.toUpperCase() === 'URLENCODE') {
// return the response
retError = querystring.parse(perror.raw_response.trim());
retError = querystring.parse(perror.response.trim());
} else {
try {
retError = JSON.parse(perror.raw_response.trim());
retError = JSON.parse(perror.response.trim());
} catch (ex) {

@@ -156,0 +161,0 @@ // otherwise log parse failure but still return the unparsed error

{
"name": "@itentialopensource/adapter-utils",
"version": "4.30.6",
"version": "4.30.7",
"description": "Itential Adapter Utility Libraries",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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