Jump to content

HTTP 500 when getting all orders - API


Recommended Posts

When I try to download orders from shop using PrestaShop API and limit them in the request everything seems to work fine - I've got HTTP 200. But when I use a request without a limit

$xmlResponse = $webService->get( [ 'resource' => 'orders', 'display' => 'full', 'output_format' => 'JSON', 'filter[valid]' => '1' ] );

without limit I've got HTTP 500, although it used to work just fine. The exact error that I have when using debug mode:

Uncaught PrestaShopWebserviceException: HTTP XML response is not parsable: array ( 0 => LibXMLError::__set_state(array( 'level' => 3, 'code' => 4, 'column' => 1, 'message' => 'Start tag expected, \'<\' not found ', 'file' => '', 'line' => 2, )), )

This error shows up almost instantly, so my guess is that's nothing like a timeout. RETURN HTTP BODY is empty:

HTTP/1.1 500 Internal Server Error 
Date: Mon, 26 Aug 2019 08:42:07 GMT 
Server: Apache 
Access-Time: 1566808935 
X-Powered-By: PrestaShop Webservice PSWS-Version: 
Execution-Time: 7.521 
Content-Sha1: 7a4d1847b5251169c96c2802c2d6c2b5404c1743 
Strict-Transport-Security: max-age=15768000 
Upgrade: h2 
Connection: Upgrade, close 
X-Content-Type-Options: nosniff 
X-Frame-Options: sameorigin 
Content-Length: 0 
Content-Type: text/xml;charset=utf-8 


Any ideas? All suggestions will be much appreciated! Have a nice day :)

Edited by njurga (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...