Developer

Configuring an Offline Application to Access the ErrorArchive

The ErrorArchive logs business logic errors and ETag mismatch errors. You can configure an offline application to access the ErrorArchive so that end users can read and delete logged errors.

The ErrorArchive is exposed to the application as an OData feed and is accessible through the OData Offline API in the same way that the application accesses any other information from the offline store.

The following Java example configures the application to access the ErrorArchive:

// query the first error
ODataResponseSingle response = store.executeReadEntitySet( “/ErrorArchive”, null );
ODataEntitySet entities = (ODataEntitySet)response.getPayload();
ODataEntity firstError = entities.getEntities().get(0);
System.out.println( entity.getProperties().get( “Message” );

The following Java example configures the application to delete an error:

// delete the error
store.executeDeleteEntity( firstError, null );