Skip to content

Commit d492663

Browse files
committed
style: fix prettier formatting in graphql-dataloader error handling
- Apply proper multiline ternary operator formatting - Fix trailing comma consistency in object literals - Ensure CI formatting check passes Resolves Copilot formatting suggestions.
1 parent 25d2e29 commit d492663

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/indexer-common/src/performance/graphql-dataloader.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,18 @@ export class GraphQLDataLoader {
231231
// Return in the same order as requested
232232
return ids.map((id) => allocationsMap.get(id.toLowerCase()) || null)
233233
} 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', {
237243
error: batchError.message,
238244
requestedCount: ids.length,
239-
operation: batchError.operation
245+
operation: batchError.operation,
240246
})
241247
throw batchError
242248
}

0 commit comments

Comments
 (0)