Comparing version 2.2.1 to 2.2.2
'use strict' | ||
const messages = require('./messages') | ||
const BaseOperationError = require('./base_operation_error') | ||
const rp = require('request-promise') | ||
@@ -76,6 +77,12 @@ const url = require('url') | ||
let error = 'Missing error message.' | ||
if (reason.error && reason.error.response && reason.error.response.result && reason.error.response.result.error) { | ||
error = reason.error.response.result.error | ||
if (reason.error) { | ||
if (reason.error.response && reason.error.response.result && reason.error.response.result.error) { | ||
error = reason.error.response.result.error | ||
} | ||
throw new BaseOperationError(`${messages.API_SYSTEM_ERROR} ${error}`, reason.error); | ||
} | ||
throw new Error(`${messages.API_SYSTEM_ERROR} ${error}`) | ||
else { | ||
throw new Error(`${messages.API_SYSTEM_ERROR} ${error}`) | ||
} | ||
} | ||
@@ -82,0 +89,0 @@ } |
{ | ||
"name": "openwhisk", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "JavaScript client library for the OpenWhisk platform", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110899
33
2235