@dotdev/harmony-sdk 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/index.js +3 -3
- package/package.json +1 -1
package/dist/helpers/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export class ApiHelper {
|
|
|
14
14
|
switch (type) {
|
|
15
15
|
case "GET":
|
|
16
16
|
response = await axiosInstance.get(url).catch((error) => {
|
|
17
|
-
logger.error(error
|
|
17
|
+
logger.error(error, `Error while sending request to ${endpoint} endpoint`);
|
|
18
18
|
throw error;
|
|
19
19
|
});
|
|
20
20
|
break;
|
|
@@ -23,7 +23,7 @@ export class ApiHelper {
|
|
|
23
23
|
response = await axiosInstance
|
|
24
24
|
.post(url, requestBody)
|
|
25
25
|
.catch((error) => {
|
|
26
|
-
logger.error(error
|
|
26
|
+
logger.error(error, `Error while sending request to ${endpoint} endpoint`);
|
|
27
27
|
throw error;
|
|
28
28
|
});
|
|
29
29
|
break;
|
|
@@ -136,7 +136,7 @@ export class ApiHelper {
|
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
138
|
logger.error(`Unexpected error occurred during API request`);
|
|
139
|
-
throw error;
|
|
139
|
+
throw JSON.stringify(error);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
/**
|