@onlineapps/infrastructure-tools 1.0.13 → 1.0.15
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/infrastructure-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Infrastructure orchestration utilities for OA Drive infrastructure services (health tracking, queue initialization, service discovery)",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -209,11 +209,29 @@ function createBaseClientAdapter(baseClient, serviceName, getHealthData, config,
|
|
|
209
209
|
status: data.status
|
|
210
210
|
});
|
|
211
211
|
} catch (error) {
|
|
212
|
-
|
|
212
|
+
// Log detailed error information including cause
|
|
213
|
+
const errorDetails = {
|
|
213
214
|
queueName,
|
|
214
|
-
error: error.message,
|
|
215
|
+
error: error.message || error.toString(),
|
|
215
216
|
stack: error.stack,
|
|
216
|
-
code: error.code
|
|
217
|
+
code: error.code,
|
|
218
|
+
name: error.name
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// Include cause if available (PublishError, ConnectionError, etc.)
|
|
222
|
+
if (error.cause) {
|
|
223
|
+
errorDetails.cause = {
|
|
224
|
+
message: error.cause.message || error.cause.toString(),
|
|
225
|
+
name: error.cause.name,
|
|
226
|
+
code: error.cause.code,
|
|
227
|
+
stack: error.cause.stack
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Log error with all details - pino needs explicit serialization
|
|
232
|
+
logger.error({
|
|
233
|
+
...errorDetails,
|
|
234
|
+
msg: `[InfrastructureHealth:${serviceName}] [PUBLISH] ✗ Failed to publish health check`
|
|
217
235
|
});
|
|
218
236
|
throw error;
|
|
219
237
|
}
|