Search query using the input request criteria with invalid parameters is returning response code of 200 OK instead 400
While performing the negative testing, invalid parameter is given in query and expectationis to receive error code of 400 with message indicating that invalid parameters were given or Unrecognized field found. This change/issue can be traced back to R3 M17. It was correct in R3M16, but changed in R3M17 This behavior is seen in CSP's environments
Request
curl --location 'https://osdu.r3m18.preshiptesting.osdu.aws/api/search/v2/query' \ --header 'Content-Type: application/json' \ --header 'data-partition-id: osdu' \ --header 'Authorization: Bearer eyJraWQiOi...KR2HY4L9s0T27lA' \ --data '{ "kind" : "osdu:wks:master-data--Well:1.0.0", "limit" : 30, "**queryinvalid**" : "data.Basin:\"Ft. Worth\"", "returnedFields" : [ "data.dlLatLongWGS84" ], "queryAsOwner" : false, "spatialFilter" : { "field" : "data.**dlLatLongWGS84**", "byBoundingBox" : { "topLeft" : { "latitude" : 34.742612, "longitude" : -101.074218 }, "bottomRight" : { "latitude" : 32.934928, "longitude" : -80.799072 } } }, "offset" : 0 } 'Response 200 OK
{ "results": [], "aggregations": [], "totalCount": 0 }The invalid parameter being passed is "queryinvalid" : "data.Basin:"Ft. Worth"",
invalid field is "field" : "data.dlLatLongWGS84"
@chad @debasisc @fhoueto.amz @Srinivasan_Narayanan @dzmitry_malkevich @vikasrana
Edited by Kamlesh Todai