Jump to content

WebService JSON status 500 si _PS_MODE_DEV_ es false


Recommended Posts

Estoy utilizando Prestashop 1.6.1.5 y al consultar el servicio web con io_format=JSON el estatus de la respuesta es 500 y la respuesta contiene la siguiente información:
 
Petición:

http://localhost/api/products?io_format=JSON

Respuesta:

{"products":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":5},{"id":6},{"id":7}],"errors":[{"code":null,"message":"Internal error. To see this error please display the PHP errors."}]}

Pero si activo _PS_MODE_DEV_ en defines.inc.php el estatus de la respuesta es 200 y los datos llegan de manera correcta.

 
Para ser precisos al configurar display_errors en on ( @ini_set('display_errors', 'on'); ) el servicio web funciona como se espera.
 
Gracias

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...