cancel
Showing results for 
Search instead for 
Did you mean: 

api error

api error

I get this error

 

main.CRITICAL: exception 'Exception' with message 'Notice: Array to string conversion in /home/etechnotics/public_html/vendor/magento/framework/Reflection/TypeCaster.php on line 34' in /home/etechnotics/public_html/vendor/magento/framework/App/ErrorHandler.php:61

Stack trace:

#0 /home/etechnotics/public_html/vendor/magento/framework/Reflection/TypeCaster.php(34): Magento\Framework\App\ErrorHandler->handler(8, 'Array to string...', '/home/etechnoti...', 34, Array)

#1 /home/etechnotics/public_html/vendor/magento/framework/Reflection/DataObjectProcessor.php(115): Magento\Framework\Reflection\TypeCaster->castValueToType(Array, 'string')

#2 /home/etechnotics/public_html/vendor/magento/framework/Reflection/DataObjectProcessor.php(107): Magento\Framework\Reflection\DataObjectProcessor->buildOutputDataArray(Object(Magento\Sales\Model\Order\Payment\Interceptor), '\\Magento\\Sales\\...')

#3 /home/etechnotics/public_html/vendor/magento/framework/Reflection/DataObjectProcessor.php(113): Magento\Framework\Reflection\DataObjectProcessor->buildOutputDataArray(Object(Magento\Sales\Model\Order), '\\Magento\\Sales\\...')

#4 /home/etechnotics/public_html/vendor/magento/framework/Webapi/ServiceOutputProcessor.php(107): Magento\Framework\Reflection\DataObjectProcessor->buildOutputDataArray(Object(Magento\Sales\Model\ResourceModel\Order\Collection), '\\Magento\\Sales\\...')

#5 /home/etechnotics/public_html/vendor/magento/framework/Webapi/ServiceOutputProcessor.php(59): Magento\Framework\Webapi\ServiceOutputProcessor->convertValue(Object(Magento\Sales\Model\ResourceModel\Order\Collection), '\\Magento\\Sales\\...')

#6 /home/etechnotics/public_html/vendor/magento/module-webapi/Controller/Rest.php(312): Magento\Framework\Webapi\ServiceOutputProcessor->process(Object(Magento\Sales\Model\ResourceModel\Order\Collection), 'Magento\\Sales\\A...', 'getList')

#7 /home/etechnotics/public_html/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()

#8 /home/etechnotics/public_html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))

#9 /home/etechnotics/public_html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

#10 /home/etechnotics/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

#11 /home/etechnotics/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

#12 {main}

2 REPLIES

Re: api error

Please, can you mention the code or rest api URL, you are calling. So that we will try to provide the best solution. 

Re: api error

We are getting "The remote server returned an error: (500) Internal Server Error." when we try to get a list of orders from your Magento API.

 

Same stack trace as posted above

 

Next exception 'Exception' with message 'Report ID: webapi-581fe453f1278; Message: Notice: Array to string conversion in /var/www/vhosts/httpdocs/vendor/magento/framework/Reflection/TypeCaster.php on line 34' in /var/www/vhosts/httpdocs/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/vhosts/httpdocs/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Exception))
#1 /var/www/vhosts/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Exception))
#2 /var/www/vhosts/httpdocs/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/vhosts/httpdocs/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/vhosts/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /var/www/vhosts/au/httpdocs/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []