How to debug error ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pukkafish
    Junior Member
    • Mar 2014
    • 10

    #1

    How to debug error ?

    Hi,

    I've tried the API about a year ago. And having another look at it now. I'm having the following error, how can I debug it?

    Debug: Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"eventTypeIds":["7"], "marketCountries":["GB"], "marketTypeCodes":["WIN"], "marketStartTime":2015-03-14T13:24:35+00:00}, "sort":"FIRST_TO_START", "maxResults":"5", "marketProjection":["RUNNER_METADATA"]}, "id": 1}]

    Debug: Response: {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}

    Thank you
  • pukkafish
    Junior Member
    • Mar 2014
    • 10

    #2
    Another error (I've changed the market start time):

    Debug: Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"eventTypeIds":["7"], "marketCountries":["GB"], "marketTypeCodes":["WIN"], "marketStartTime":["from:2015-03-14T13:34:24+00:00"]}, "sort":"FIRST_TO_START", "maxResults":"5", "marketProjection":["RUNNER_METADATA"]}, "id": 1}]


    Debug: Response: [{"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":1}]

    Call to api-ng failed: Response: [{"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":1}]

    Comment

    • pukkafish
      Junior Member
      • Mar 2014
      • 10

      #3
      Ok. Making progress ... What can I do to make sure I have a valid session?

      Debug: Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"eventTypeIds":["7"], "marketCountries":["GB"], "marketTypeCodes":["WIN"], "marketStartTime":{"from":"2015-03-14T13:42:39+00:00","to": "2015-03-14T23:59:00Z"}}, "sort":"FIRST_TO_START", "maxResults":"5", "marketProjection":["RUNNER_METADATA"]}, "id": 1}]


      Debug: Response: [{"jsonrpc":"2.0","error":{"code":-32099,"message":"ANGX-0003","data":{"exceptionname":"APINGException","AP INGException":{"errorDetails":"","errorCode":"INVA LID_SESSION_INFORMATION","requestUUID":"prdang037-02231227-0048e40bdb"}}},"id":1}]

      Call to api-ng failed: Response: [{"jsonrpc":"2.0","error":{"code":-32099,"message":"ANGX-0003","data":{"exceptionname":"APINGException","AP INGException":{"errorDetails":"","errorCode":"INVA LID_SESSION_INFORMATION","requestUUID":"prdang037-02231227-0048e40bdb"}}},"id":1}]

      Comment

      • BigSprout
        Junior Member
        • Feb 2011
        • 60

        #4
        pukkafish,
        maxResults is type integer, you have it enclosed in quotations (type string)

        try:
        "maxResults":5

        cheers

        Comment

        • pukkafish
          Junior Member
          • Mar 2014
          • 10

          #5
          @BigSprout

          Thank you. But I've still an error after removing the quotes:

          4. Get next horse racing market in the UK....
          2015-03-16T08:13:55+00:00
          Debug: Post Data: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"eventTypeIds":["7"], "marketCountries":["GB"], "marketTypeCodes":["WIN"], "marketStartTime":{"from":"2015-03-16T08:13:55+00:00","to": "2015-03-16T23:59:00Z"}}, "sort":"FIRST_TO_START", "maxResults":5, "marketProjection":["RUNNER_METADATA"]}, "id": 1}]


          Debug: Response: {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}


          Fatal error: Cannot use object of type stdClass as array in /homepages/16/d408779085/htdocs/pukkanewc/BF.php on line 338

          Comment

          • betdynamics
            Junior Member
            • Sep 2010
            • 534

            #6
            Two possible causes (these are guesses):

            1. The format of your "from" time looks different to the "to" time. Perhaps that is causing the parser to fail.

            or

            2. Your JSON request is enclosed in [ ] characters - this would indicate an array (as mentioned in the error message). Try removing the bounding characters and just send the string that is enclosed by { }

            Comment

            • pukkafish
              Junior Member
              • Mar 2014
              • 10

              #7
              @betdynamics

              Thank you for your input. Unfortunately, this is still failing :-(

              4. Get next horse racing market in the UK....
              2015-03-16T12:11:28+00:00
              Debug: Post Data: { "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"eventTypeIds":["7"], "marketCountries":["GB"], "marketTypeCodes":["WIN"], "marketStartTime":{"from":"2015-03-14T00:00:01Z","to": "2015-03-16T23:59:00Z"}}, "sort":"FIRST_TO_START", "maxResults":5, "marketProjection":["RUNNER_METADATA"]}, "id": 1}


              Debug: Response: {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}


              Fatal error: Cannot use object of type stdClass as array in /homepages/16/d408779085/htdocs/pukkanewc/BF.php on line 340



              4. Get next horse racing market in the UK....
              2015-03-16T12:15:05+00:00
              Debug: Post Data: { "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params" :{"filter":{"eventTypeIds":["7"], "marketCountries":["GB"], "marketTypeCodes":["WIN"], "marketStartTime":{"from":"2015-03-15T10:00:00+00:00","to": "2015-03-16T12:11:28+00:00"}}, "sort":"FIRST_TO_START", "maxResults":5, "marketProjection":["RUNNER_METADATA"]}, "id": 1}


              Debug: Response: {"jsonrpc":"2.0","error":{"code":-32700,"message":"DSC-0008"}}


              Fatal error: Cannot use object of type stdClass as array in /homepages/16/d408779085/htdocs/pukkanewc/BF.php on line 340




              Has anyone any PHP working script for horse racing?

              Thanks

              Comment

              Working...
              X