@huaweicloud/huaweicloud-sdk-core
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -32,4 +32,16 @@ "use strict"; | ||
var data = exception.data || {}; | ||
var errorCode = data.error ? data.error.code : exception.status; | ||
var errorMsg = data.error ? data.error.message : exception.message; | ||
var errorMsg; | ||
var errorCode; | ||
if (data.error) { | ||
errorCode = data.error.code; | ||
errorMsg = data.error.message; | ||
} | ||
else if (data.error_code) { | ||
errorCode = data.error_code; | ||
errorMsg = data.error_msg; | ||
} | ||
else { | ||
errorCode = exception.status; | ||
errorMsg = exception.message; | ||
} | ||
var requestId = exception.requestId; | ||
@@ -36,0 +48,0 @@ var httpStatusCode = exception.status; |
{ | ||
"name": "@huaweicloud/huaweicloud-sdk-core", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Core code for Huaweicloud SDK for Node.js", | ||
@@ -31,2 +31,3 @@ "main": "huaweicloud-sdk-core.js", | ||
"devDependencies": { | ||
"@babel/parser": "^7.19.1", | ||
"@types/chai": "^4.2.16", | ||
@@ -33,0 +34,0 @@ "@types/chai-like": "^1.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
313766
3766
23