File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/indexer-common/src/performance Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -231,12 +231,18 @@ export class GraphQLDataLoader {
231
231
// Return in the same order as requested
232
232
return ids . map ( ( id ) => allocationsMap . get ( id . toLowerCase ( ) ) || null )
233
233
} catch ( error ) {
234
- const batchError = error instanceof BatchLoadError ? error :
235
- new BatchLoadError ( 'allocations' , ids . length , error instanceof Error ? error : undefined )
236
- this . logger . error ( 'Failed to batch load allocations' , {
234
+ const batchError =
235
+ error instanceof BatchLoadError
236
+ ? error
237
+ : new BatchLoadError (
238
+ 'allocations' ,
239
+ ids . length ,
240
+ error instanceof Error ? error : undefined ,
241
+ )
242
+ this . logger . error ( 'Failed to batch load allocations' , {
237
243
error : batchError . message ,
238
244
requestedCount : ids . length ,
239
- operation : batchError . operation
245
+ operation : batchError . operation ,
240
246
} )
241
247
throw batchError
242
248
}
You can’t perform that action at this time.
0 commit comments