From 1a2b66167e758b1eede4914bcf9a22b06c915e46 Mon Sep 17 00:00:00 2001 From: Jimmy Cheung <50635800+chejimmy@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:20:33 -0800 Subject: [PATCH] fix: optional property check for error metadata --- .../client/batchGetHistoricalPropertyDataPoints.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts b/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts index 616727b92..b551fccbc 100644 --- a/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts +++ b/packages/source-iotsitewise/src/time-series-data/client/batchGetHistoricalPropertyDataPoints.ts @@ -163,7 +163,7 @@ const sendRequest = ({ Object.entries(callbackCache).forEach(([entryId, { onError }]) => { onError({ entryId, - errorCode: e.$metadata.httpStatusCode, + errorCode: e?.$metadata.httpStatusCode, errorMessage: e.message, }); });