I'm using a viewJsonService from the XPages Extension Library to return data for an agGrid. The service is called using it's URL with a keys parameter to select the data returned. If the key doesn't exist in the view then I'm getting an error NotesException: CreateNavFromKey failed.
I'm working around this by checking the whether the key exists in the view and if it doesn't using a second REST service that just returns an empty JSON object.
But is there any way of trapping the error so that the viewJsonService returns an empty JSON object in this scenario?
This is running on Domino 10.0.1 FP1
UPDATE...
<xe:restService id="restService1" pathInfo="getContactsForInd">
<xe:this.service>
<xe:viewJsonService defaultColumns="true" viewName="vwContactsByInd" var="row" databaseName="#{javascript:sessionScope.DBPath}" searchMaxDocs="0" count="5">
<xe:this.keys><![CDATA[#{javascript:docInd.getItemValueString("IndKey");}]]></xe:this.keys>
</xe:viewJsonService>
</xe:this.service>
</xe:restService>