Skip to content

Commit f249c50

Browse files
committed
fix: reset error stack on *All() calls
1 parent 85b3240 commit f249c50

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export class DynamoPlus {
164164
},
165165
})
166166
}, Promise.resolve())
167+
.catch(throwErrorWithCallstack)
167168
}
168169

169170
async getAll <ExpectedReturnType = unknown>(params: GetAllInput): Promise<ExpectedReturnType[]> {
@@ -189,6 +190,7 @@ export class DynamoPlus {
189190
})
190191
return [...previousResults, ...(output[TableName] ? output[TableName] as ExpectedReturnType[] : [])]
191192
}, Promise.resolve([]))
193+
.catch(throwErrorWithCallstack)
192194
}
193195

194196
async putAll (params: PutAllInput): Promise<void> {
@@ -211,6 +213,7 @@ export class DynamoPlus {
211213
},
212214
})
213215
}, Promise.resolve())
216+
.catch(throwErrorWithCallstack)
214217
}
215218

216219
async * queryIterator <ExpectedReturnType = unknown>(params: QueryCommandInput, pageSize = 100): AsyncGenerator<Awaited<ExpectedReturnType>> {

0 commit comments

Comments
 (0)