Socket
Socket
Sign inDemoInstall

openshift-rest-client

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openshift-rest-client - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

14

lib/common-request.js

@@ -48,12 +48,14 @@ 'use strict';

const buildError = (body) => {
const err = new Error(body.message);
err.statusCode = body.code;
return err;
};
request(req, (err, resp, body) => {
if (err) {
const err = new Error(body);
err.statusCode = resp.statusCode;
return reject(err);
}
if (err) return buildError(body);
// Need to reject on unauthorized and errors that are not 404
if (resp.statusCode > 399 && resp.statusCode !== 404) {
return reject(body);
return reject(buildError(body));
}

@@ -60,0 +62,0 @@

{
"name": "openshift-rest-client",
"version": "0.10.0",
"version": "0.10.1",
"description": "Node.js client for developing with OpenShift",

@@ -5,0 +5,0 @@ "main": "index.js",

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