Forum Discussion

RAgarwal's avatar
RAgarwal
New Contributor
6 years ago

not allowed when FAIL_ON_READING_DUP_TREE_KEY enabled

I am getting the below mentioned error for REST request (POST)but the same request works completely fine in POSTMAN, not sure if it has something to do with the settings or issue with Ready Api tool itself. Any help will be appreciated. Thanks.

 

Verified body of POST is a valid JSON. 

 

Response: 

The content you are trying to view is not valid JSON.

Duplicate field 'displayTypeQualifier' for ObjectNode: not allowed when FAIL_ON_READING_DUP_TREE_KEY enabled

 

 

 

 

6 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    Based on that error message, it sounds like the content coming back is not valid JSON? Can you inspect the response from POSTMAN and check it for json validity? A copy/paste of the response from postman and/or the RAW tab (if applicable) in ReadyAPI may help as well.

    • RAgarwal's avatar
      RAgarwal
      New Contributor

      Verified response from POSTMAN is a valid JSON.

       

      Response from POSTMAN:

       

      {
      "displayCatalogMembers": [{
      "displayTypeQualifier": "DisplayOfferingGroup",
      "id": "123456789",
      "name": "Region",
      "sequence": 1,
      "members": [],
      "displayOfferingGroupFilters": []
      }]
      }

       

      RAW response from Ready API:

       

      {
      "displayCatalogMembers": [{
      "displayTypeQualifier": "DisplayOfferingGroup",
      "id": "123456789",
      "name": "Region",
      "displayTypeQualifier": "DisplayOfferingGroup",
      "sequence": 1,
      "members": [],
      "displayOfferingGroupFilters": []
      }]

      }

       

      In RAW response of Ready API we are getting attribute "displayTypeQualifier" twice but not sure why? Why is POSTMAN and Ready API giving different response for the same endpoint and same request. Does the POSTMAN remove the duplicate attributes automatically?

       

       

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        I wish I could provide more insight, but I do not know how to make heads or tails of this. As far as I am aware, both POSTMAN and ReadyAPI (especially in the RAW tab) will show exactly what the service returns, unedited and untouched.


        That being said, the only explanation I can think of for this is that, maybe, the service running has a potential issue. I have seen similar behaviors when I have a service running that is clustered between two nodes. One node may be in a bad state, returning bad responses, while the other node works as intended.  It's a long shot, but worth looking in to. 

         

        Other than that, I'll admit I am stumped.