From 703e9a5def6da7c188934410e15ec50500e516fd Mon Sep 17 00:00:00 2001 From: ashwin <96258515+repl-ashwin-r@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:01:28 -0500 Subject: [PATCH] Fix error handling for TrimmedDataAccessException Changes in aws sdk v3 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 621eda0..18550eb 100644 --- a/index.js +++ b/index.js @@ -99,7 +99,7 @@ class DynamodDBSubscriber extends EventEmitter { debug('stream.getRecords (start) Shard: %s', shard.ShardId); this._ddbStream.getRecords({ ShardIterator: shard.iterator }, (err, data) => { if (err) { - if (err.code === 'TrimmedDataAccessException') { + if (err.name === 'TrimmedDataAccessException') { this._ddbStream.getShardIterator({ StreamArn: this._streamArn, ShardId: shard.ShardId,