November Happy Hour will be moved to Thursday December 5th.

NumberFormatException when there should be no conversion to string

Vote:
 

I am trying to execute this query:

x => x.SearchParent().Match(CurrentPage.SearchFolder)

But I am getting back a 400 from find with exception NumberFormatException.

Here us the defination for SearchParent()

public static string[] SearchParent(this UnifiedFile file)

Result in Find index:

"SearchParent": [
    "/PageFiles/",
    "/PageFiles/112971/"
  ]

 Also have this:

client.Conventions.ForInstancesOf().IncludeField(f => f.SearchParent());

Cannot see why a tring needs to be converted to a number, while matching a string...

#121883
May 19, 2015 12:53
Vote:
 

Fixed it by renaming the method to SearchAncestor.

Works fine now, but would like to know why this happens.

#122931
Jun 18, 2015 9:57
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.