500 error when querying for Customer info through api endpoint - authorization is correct

beadworksbeadworks Member Posts: 2
I checked the other cause from the forum in Feb (Authorization) and mine is in the correct format. The applications experiencing this error is long established and have never produced such a result before. Other endpoints seem to be out.


data\ValidationError thrown within the exception handler. Message: Can not set "helpers\api\DataError.message" to a non string (string) value (Exception::__set_state(array(
   'message' => 'Detected more than one query string. Is your url properly constructed?',
   'string' => '',
   'code' => 400,
   'file' => '/web/cloud/includes/api/RestRequest.class.php',
   'line' => 648,
   'trace' => 
  array (
    0 => 
    array (
      'file' => '/web/cloud/includes/api/RestRequest.class.php',
      'line' => 208,
      'function' => '_setQueryString',
      'class' => 'api\\RestRequest',
      'type' => '->',
      'args' => 
      array (
        0 => 'load_relations=[%22Contact%22]?offset=0',
      ),
    ),
    1 => 
    array (
      'file' => '/web/cloud/www/API/index.php',
      'line' => 15,
      'function' => '__construct',
      'class' => 'api\\RestRequest',
      'type' => '->',
      'args' => 
      array (
      ),
    ),
  ),
   'previous' => NULL,
)))." on line 272{"httpCode":"500","httpMessage":"Internal Server Error","message":"Error reporting is broken : check error_log()"}

3 comments

  • Michael CareyMichael Carey Administrator, Lightspeed Staff Posts: 68 moderator
    Hi @beadworks,

    It looks like you are using a question mark instead of an ampersand to separate your query parameters. To correct the issue use the following format:

    /Customer?load_relations=[%22Contact%22]&offset=0

    It also looks like there is a bug on our side as we shouldn't be returning a stack trace like this. We'll look into that and get it corrected.

    Thanks,
    Michael Carey

    Product Manager
    Lightspeed HQ
  • beadworksbeadworks Member Posts: 2
    Thank you for the fast response! It is functioning again but unfortunately the CustomerType endpoint is also returning a None. Should I start a new thread for that?
  • jamesratcliffejamesratcliffe Administrator, Lightspeed Staff Posts: 160 moderator
    Yes, please start a new thread.
    James Ratcliffe
    Lightspeed HQ
Sign In or Register to comment.