Skip to content

Commit 4574388

Browse files
authored
[Synthetics] Prevent undefined in the error log !! (#232939)
## Summary Prevent undefined in the error log !!
1 parent a24c33d commit 4574388

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/solutions/observability/plugins/synthetics/server/synthetics_service/service_api_client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ export class ServiceAPIClient {
343343
) {
344344
const reason = err.response?.data?.reason ?? '';
345345

346-
err.message = `Failed to call service location ${url}${err.request?.path} with method ${method} with ${numMonitors} monitors: ${err.message}, ${reason}`;
346+
err.message = `Failed to call service location ${url}${
347+
err.request?.path ?? ''
348+
} with method ${method} with ${numMonitors} monitors: ${err.message}, ${reason}`;
347349
this.logger.error(err);
348350
sendErrorTelemetryEvents(this.logger, this.server.telemetry, {
349351
reason: err.response?.data?.reason,

0 commit comments

Comments
 (0)