UpendraSingh / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

"Field searchAndReplaceDetails.replaceString is required." error message with empty replaceString #527

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

---
Name of affected component: Management API

Name of related library and version, if applicable (e.g. Java, Python,
HTTP, etc.): Ruby

Issue summary:
Provide a brief summary of the issue you're experiencing.
When inserting a search and replace filter, if the replaceString key is absent 
or set to the empty string, then a 400 error is returned with the mssage "Field 
searchAndReplaceDetails.replaceString is required."

In the Analytics UI, this field is optional, and should also allow searchString 
to be replaced with the empty string.

Steps to reproduce issue:
1.  Call analytics.management.filters.insert with a SEARCH_AND_REPLACE filter 
with the following properties:
{ field: 'PAGE_REQUEST_URI', searchString: 'index.html', replaceString: '', 
caseSensitive: false }

Expected output:
What do you expect to see after performing the above steps?
200 response

Actual results:
What do you actually see after performing the above steps?
400 response

Original issue reported on code.google.com by jgadb...@gmail.com on 31 Oct 2014 at 3:48

GoogleCodeExporter commented 8 years ago
Just to add to this, sending via custom C# code ... 

"searchAndReplaceDetails":{"field":"PAGE_REQUEST_URI","searchString":"expression
","replaceString":null,"caseSensitive":false}

 ... also does not seem to work - same error.

Replacing the null with any string expression works fine.
Replacing the null with "" causes the error.
Removing the null causes the error.

Original comment by mike.3.s...@gmail.com on 29 Jul 2015 at 2:09