Skip to content

v2.0.0 NuGet package- Handling of invalid configuration

Compare
Choose a tag to compare
@kentico-ericd kentico-ericd released this 23 May 19:15
· 59 commits to master since this release
404808f

Fixes #9. Previously, missing or invalid Algolia application settings would cause application initialization to fail, making the Xperience administration UI inaccessible. With this release, the required services will always be registered during startup, and logging has been introduced to the administration to indicate errors during initialization.

For the .NET Core application, examples for handling these errors has been added to the README.md. You should use a try/catch to handle a potentially misconfigured search client:

var searchIndex = _searchClient.InitIndex(AlgoliaSiteSearchModel.IndexName);
var query = new Query(searchText);
try
{
    var results = searchIndex.Search<YourModel>(query);
}
catch (Exception e)
{
    //...
}

Breaking changes

  • Default implementations of services (ie DefaultAlgoliaInsightsService) have been marked internal.