Skip to content

Commit 51c6bfe

Browse files
committed
MAGETWO-88631: Pr sprint 10 delivery
- fix class name - restore test error response - restore debug messaging
1 parent db65096 commit 51c6bfe

File tree

3 files changed

+6
-3
lines changed
  • app/code/Magento/CatalogGraphQl/etc
  • dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl
  • lib/internal/Magento/Framework/GraphQl/Query

3 files changed

+6
-3
lines changed

app/code/Magento/CatalogGraphQl/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<type name="Magento\Framework\GraphQl\Query\Resolver\Argument\FieldEntityAttributesPool">
3838
<arguments>
3939
<argument name="attributesInstances" xsi:type="array">
40-
<item name="products" xsi:type="object">Magento\CatalogGraphQl\Model\Resolver\Products\FilterArgument\ProductEntityAttributesforAst</item>
40+
<item name="products" xsi:type="object">Magento\CatalogGraphQl\Model\Resolver\Products\FilterArgument\ProductEntityAttributesForAst</item>
4141
</argument>
4242
</arguments>
4343
</type>

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQl/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function processErrors($responseBodyArray)
102102
}
103103
}
104104

105-
throw new \Exception('GraphQL response contains errors: ' . json_encode($responseBodyArray));
105+
throw new \Exception('GraphQL response contains errors: ' . $errorMessage);
106106
}
107107
throw new \Exception('GraphQL responded with an unknown error: ' . json_encode($responseBodyArray));
108108
}

lib/internal/Magento/Framework/GraphQl/Query/QueryProcessor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public function process(
6161
$contextValue,
6262
$variableValues,
6363
$operationName
64-
)->toArray(\GraphQL\Error\Debug::INCLUDE_DEBUG_MESSAGE | \GraphQL\Error\Debug::INCLUDE_TRACE);
64+
)->toArray(
65+
$this->exceptionFormatter->shouldShowDetail() ?
66+
\GraphQL\Error\Debug::INCLUDE_DEBUG_MESSAGE | \GraphQL\Error\Debug::INCLUDE_TRACE : false
67+
);
6568
}
6669
}

0 commit comments

Comments
 (0)