File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -262,14 +262,14 @@ function dispatchQueueBatch<K, V>(
262262
263263 // Assert the expected resolution from batchLoadFn.
264264 if ( ! Array . isArray ( values ) ) {
265- throw new Error (
265+ throw new TypeError (
266266 'DataLoader must be constructed with a function which accepts ' +
267267 'Array<key> and returns Promise<Array<value>>, but the function did ' +
268268 `not return a Promise of an Array: ${ String ( values ) } .`
269269 ) ;
270270 }
271271 if ( values . length !== keys . length ) {
272- throw new Error (
272+ throw new TypeError (
273273 'DataLoader must be constructed with a function which accepts ' +
274274 'Array<key> and returns Promise<Array<value>>, but the function did ' +
275275 'not return a Promise of an Array of the same length as the Array ' +
You can’t perform that action at this time.
0 commit comments