Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RESTHandler returns no errorMessages when requiredCriterion fails

    SmartClient Version: SNAPSHOT_v13.1d_2024-10-06/AllModules Development Only (built 2024-10-06)
    and
    SmartClient Version: v13.0p_2024-10-05/AllModules Development Only (built 2024-10-05)


    Hello, please try this test case here https://www-demos.smartclient.com/sm...uiredCriterion

    modified as (for 13.1):

    Code:
    isc.RestDataSource.create({
        ID:"worldDS",
        dataURL:"https://www-demos.smartclient.com/smartclient-13.1/isomorphic/RESTHandler?dataSource=worldDS&operationType=fetch&operationId=fetchByRequiredCriterion"
    }).fetchData()
    or like this for 13.0:
    Code:
    isc.RestDataSource.create({
        ID:"worldDS",
        dataURL:"https://www-demos.smartclient.com/smartclient-13.0/isomorphic/RESTHandler?dataSource=worldDS&operationType=fetch&operationId=fetchByRequiredCriterion"
    }).fetchData()
    You'll see the correct error code 13 in the response, but no errorMessages.
    Last edited by claudiobosticco; 7 May 2025, 01:44.

    #2
    Hello, actually I just realized that for this kind of error, the response protocol seems different, as in the requiredCriterion sample I think, where the response is:

    Code:
    {
        affectedRows:0,
        invalidateCache:false,
        isDSResponse:true,
        missingCriterion:"Area (kmē)",
        queueStatus:-1,
        status:-13,
        data:null
    }
    so maybe this is the actual problem?

    Comment


      #3
      Hello, please let me know if you see the issue or need any additional details.
      From my perspective, it seems the RESTHandler should return a response similar to the one in post #2.

      Comment


        #4
        Hi Claudio
        Just a note to say this is being looked at and we'll follow up when we have any information for you

        Regards
        Isomorphic Software

        Comment


          #5
          hello, any news about this issue?

          Comment


            #6
            Sorry for the delay. This issue has now been fixed; the fix will be present in builds of 13.0 and greater as of tomorrow, December 20th.

            Comment


              #7
              Hello, sorry for the delayed feedback. I've tested this with both latest version 13.0 and 13.1, and it only works if I don't use the "Simplified REST" syntax.
              Using the test case from the first post - modified to use the Simplified syntax (this is for the 13.0 showcase, requiredCriterion sample):

              Code:
              isc.RestDataSource.create({
                  ID:"worldDS",
                  dataFormat:"json",
                  dataURL:"https://www-demos.smartclient.com/smartclient-13.0/isomorphic/RESTHandler/worldDS/fetch/fetchByRequiredCriterion"
              }).fetchData()
              I still get this response in the browser's Network tab:

              Code:
              <SCRIPT>//'"]]>>isc_JSONResponseStart>>{"errorCode":-13,"errorMessages":[]}//isc_JSONResponseEnd
              (Note: in the RPC tab of the Developer Console, there's a "Transport Error" - is that expected?)

              Comment

              Working...
              X