namirasoft-core
Advanced tools
Comparing version 1.4.14 to 1.4.15
@@ -60,4 +60,4 @@ "use strict"; | ||
if (error instanceof Error) { | ||
let BASESERVER_ERROR_VERBOSE = new EnvService_1.EnvService("BASESERVER_ERROR_VERBOSE", false).getBoolean(false); | ||
if (this.onError) { | ||
let BASESERVER_ERROR_VERBOSE = new EnvService_1.EnvService("BASESERVER_ERROR_VERBOSE", false).getBoolean(false); | ||
if (BASESERVER_ERROR_VERBOSE) | ||
@@ -73,4 +73,8 @@ error.message = `Error calling url '${url}' ` + error.message; | ||
if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) | ||
if (!this.suppressErrors) | ||
ErrorOperation_1.ErrorOperation.throwHTTP(error.response.status, `Error calling url '${url}' ` + JSON.stringify(error.response.data)); | ||
if (!this.suppressErrors) { | ||
if (BASESERVER_ERROR_VERBOSE) | ||
ErrorOperation_1.ErrorOperation.throwHTTP(error.response.status, `Error calling url '${url}' ` + JSON.stringify(error.response.data)); | ||
else | ||
ErrorOperation_1.ErrorOperation.throwHTTP(error.response.status, JSON.stringify(error.response.data)); | ||
} | ||
} | ||
@@ -77,0 +81,0 @@ if (!this.suppressErrors) |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.4.14", | ||
"version": "1.4.15", | ||
"author": "Amir Abolhasani", | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
@@ -58,5 +58,6 @@ import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; | ||
{ | ||
let BASESERVER_ERROR_VERBOSE = new EnvService("BASESERVER_ERROR_VERBOSE", false).getBoolean(false); | ||
if (this.onError) | ||
{ | ||
let BASESERVER_ERROR_VERBOSE = new EnvService("BASESERVER_ERROR_VERBOSE", false).getBoolean(false); | ||
if (BASESERVER_ERROR_VERBOSE) | ||
@@ -74,3 +75,8 @@ error.message = `Error calling url '${url}' ` + error.message; | ||
if (!this.suppressErrors) | ||
ErrorOperation.throwHTTP(error.response.status, `Error calling url '${url}' ` + JSON.stringify(error.response.data)); | ||
{ | ||
if (BASESERVER_ERROR_VERBOSE) | ||
ErrorOperation.throwHTTP(error.response.status, `Error calling url '${url}' ` + JSON.stringify(error.response.data)); | ||
else | ||
ErrorOperation.throwHTTP(error.response.status, JSON.stringify(error.response.data)); | ||
} | ||
} | ||
@@ -77,0 +83,0 @@ if (!this.suppressErrors) |
Sorry, the diff of this file is not supported yet
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
410780
5379