AI OnAI Off
You can put your code insida a try-catch-statement:
try { client.Update<BlogPost>(Id).Field(x => x.PublishDate, newTime).Execute(); } catch (Exception ex) { }
Johan, other than try-catch, is there any systematic EPiServer Find way (in query level) of doing this ?
I don't think so. It's common practice to return 404 status codes in RESTful APIs when objects are not found.
I'm using some what smiler to following code for update an object in Find Service
But when particulate object is not in the index, I'm getting following error:
But what I want is, if particular item is not available in the index, query should execute without an exception (even though it will not effecting any object in the index). So how could I achieve this ?