Skip to content

Commit 6ae9d4e

Browse files
committed
MAGETWO-81034: API for fetching multiple products
- static fixes
1 parent 8e994de commit 6ae9d4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/GraphQl/Model/Resolver/Products.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ public function resolve(array $args, ResolveInfo $info)
5656

5757
$maxPages = ceil($itemsResults->getTotalCount() / $searchCriteria->getPageSize());
5858
if ($searchCriteria->getCurrentPage() > $maxPages && $itemsResults->getTotalCount() > 0) {
59-
throw new \GraphQL\Error\Error(sprintf('The value specified in the currentPage attribute is greater than the number of pages available (%s).', $maxPages));
59+
throw new \GraphQL\Error\Error(
60+
sprintf(
61+
'The value specified in the currentPage attribute is greater than the number'
62+
. 'of pages available (%s).',
63+
$maxPages
64+
)
65+
);
6066
}
6167

6268
return [

0 commit comments

Comments
 (0)