Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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:
[WebException: The remote server returned an error: (404) Not Found.]
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 ?