@dotdev/harmony-sdk 1.24.0 → 1.26.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 +10 -2
- package/package.json +1 -1
package/dist/helpers/index.js
CHANGED
|
@@ -116,7 +116,14 @@ export class ApiHelper {
|
|
|
116
116
|
}
|
|
117
117
|
else {
|
|
118
118
|
logger.error(`API request error`);
|
|
119
|
-
logger.child({
|
|
119
|
+
logger.child({
|
|
120
|
+
error: {
|
|
121
|
+
config: error?.config,
|
|
122
|
+
request: error?.request,
|
|
123
|
+
data: error?.response?.data,
|
|
124
|
+
status: error?.response?.status,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
120
127
|
return new RequestError(`API request failed but error response is not in Harmony XML format. Please check the logs for more details.`);
|
|
121
128
|
}
|
|
122
129
|
}
|
|
@@ -128,7 +135,8 @@ export class ApiHelper {
|
|
|
128
135
|
}
|
|
129
136
|
}
|
|
130
137
|
else {
|
|
131
|
-
|
|
138
|
+
logger.error(`Unexpected error occurred during API request`);
|
|
139
|
+
throw error;
|
|
132
140
|
}
|
|
133
141
|
}
|
|
134
142
|
/**
|