Skip to content

Commit f75bf99

Browse files
committed
Internal Server Error in /V1/order/{orderId}/ship API Endpoint
1 parent 57cbaad commit f75bf99

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\Framework\Webapi;
99

10+
use Laminas\Code\Reflection\ClassReflection;
1011
use Magento\Framework\Api\AttributeValue;
1112
use Magento\Framework\Api\AttributeValueFactory;
1213
use Magento\Framework\Api\SearchCriteriaInterface;
@@ -22,9 +23,8 @@
2223
use Magento\Framework\Phrase;
2324
use Magento\Framework\Reflection\MethodsMap;
2425
use Magento\Framework\Reflection\TypeProcessor;
25-
use Magento\Framework\Webapi\Exception as WebapiException;
2626
use Magento\Framework\Webapi\CustomAttribute\PreprocessorInterface;
27-
use Laminas\Code\Reflection\ClassReflection;
27+
use Magento\Framework\Webapi\Exception as WebapiException;
2828
use Magento\Framework\Webapi\Validator\IOLimit\DefaultPageSizeSetter;
2929
use Magento\Framework\Webapi\Validator\ServiceInputValidatorInterface;
3030

@@ -539,6 +539,8 @@ private function processComplexTypes($data, $type)
539539

540540
if (!$isArrayType) {
541541
return $this->_createFromArray($type, $data);
542+
} elseif (!is_array($data)) {
543+
throw new InvalidArgumentException(__('Not all parameters valid.'));
542544
}
543545

544546
$result = is_array($data) ? [] : null;

0 commit comments

Comments
 (0)