Override the Search Friendly Error Message

Warning
Legacy feature

This article pertains to the Coveo Hive framework which is now in maintenance mode.

Choose one of Coveo’s more modern, lightweight, and responsive libraries for any future search interface development. See the search interface Implementation guide for more details.

If a critical error occurs when rendering the search page, the Coveo Search Interface rendering is set to render an error such as the one below, instead of raising an ASP.NET error:

36176157

These error captions are stored in Coveo for Sitecore dictionaries in the Sitecore Content Editor. This article explains how you can override them with your own dictionary entries.

Important

Don’t store custom Dictionary entry items in the /sitecore/system/Dictionary/Coveo Hive folder as this folder is overwritten when upgrading Coveo for Sitecore.

Step 1: Create a Dictionary for Your Custom Labels

  1. Open the Sitecore Content Editor.

  2. Navigate to /sitecore/system/Dictionary.

  3. Select the Dictionary item, then right-click it and select Insert > Dictionary folder.

  4. Name your dictionary. For this example, you can name it Custom.

Step 2: Create the Custom Title Caption

  1. Select the Custom item, right-click it and select Insert > Dictionary entry.

  2. Enter a name such as CustomSearchUnavailableErrorTitle.

  3. Fill the Key field with the text below.

    Search is currently unavailable
    Note

    The text must be exactly as shown above. Make sure there are no leading or trailing whitespaces.

  4. Fill the Phrase field with the text you want.

Step 3: Create the Custom Label for the Detail Message

  1. Create a new Dictionary entry as in step 2.

  2. Fill the Key field with the text below.

    If the problem persists contact the administrator.
    Note

    The text must be exactly as shown above. Make sure there are no leading or trailing whitespaces.

  3. Fill the Phrase field with the text you want.

Step 4: Add Your Custom Dictionary to the List of Additional Dictionaries

You need to tell Coveo for Sitecore where to look for your custom dictionary entries. You do this in the Coveo Search Resources rendering data source.

  1. In the Experience Editor, select the Coveo Search Resources rendering. You usually need to scroll to the very bottom of the page to locate it.

  2. In the floating toolbar, select the Edit the rendering’s data source option. It should be the leftmost option in the toolbar.

  3. Under Additional Dictionaries, select your Custom dictionary folder.

    Adding a custom dictionary folder to the Additional Dictionaries | Coveo for Sitecore 5
    Note

    Coveo for Sitecore reads the Additional Dictionaries list from top to bottom. Dictionary entries with the same Key are successively overridden and the last entry is applied in the search interface.

  4. Publish all your changes.

The friendly error messages are now overridden.

36176158