mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
throw error after catch (#4442)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
7ced4001f3
commit
7879dffc3c
@ -601,13 +601,14 @@ abstract class MongoAdapterBase implements DbAdapter {
|
||||
let res: T[] = []
|
||||
try {
|
||||
res = await cursor.toArray()
|
||||
if (options?.total === true && options?.limit === undefined) {
|
||||
total = res.length
|
||||
}
|
||||
return toFindResult(this.stripHash(res), total)
|
||||
} catch (e) {
|
||||
console.error('error during executing cursor in findAll', _class, cutObjectArray(query), options, e)
|
||||
throw e
|
||||
}
|
||||
if (options?.total === true && options?.limit === undefined) {
|
||||
total = res.length
|
||||
}
|
||||
return toFindResult(this.stripHash(res), total)
|
||||
}
|
||||
|
||||
stripHash<T extends Doc>(docs: T[]): T[] {
|
||||
|
Loading…
Reference in New Issue
Block a user