---
title: "How to hide widget with the error message \"Widget could not be loaded'"
description: "How to hide widget with the error message \"Widget could not be loaded'"
---

[Skip to content](https://knowledge-base.statscore.com/knowledge-base/hiding-widget#main-content)

English

Show submenu for translations

[![STATSCORE-logo-CUST\_PORTAL](https://knowledge-base.statscore.com/hs-fs/hubfs/statscore-logo-purple-500.png?width=200&height=60&name=statscore-logo-purple-500.png)](https://www.statscore.com/)

- [My tickets](https://helpdesk.statscore.com/tickets-view)
- [Sign out](https://helpdesk.statscore.com/_hcms/mem/logout)

Open main navigation

Close main navigation

- [My tickets](https://helpdesk.statscore.com/tickets-view)
- [Sign out](https://helpdesk.statscore.com/_hcms/mem/logout)
- English
  
  Show submenu for translations
- CONTACT US

 CONTACT US

 HOW CAN WE HELP YOU?

- There are no suggestions because the search field is empty.

1. [STATSCORE Knowledge Base](https://knowledge-base.statscore.com/knowledge-base?hsLang=en)
2. [LivematchPro](https://knowledge-base.statscore.com/knowledge-base/livematchpro?hsLang=en)
3. [Integration - how to start](https://knowledge-base.statscore.com/knowledge-base/livematchpro?hsLang=en#integration-how-to-start)

# How to hide widget with the error message "Widget could not be loaded'

## This article will help you hide the error message about the widget not loading. In these cases, you can display, for example, your own scoreboard.

### Problem

For some events, you can experience error message saying “widget could not be loaded”.

### Solution

Although the STATSCORE offer is very extensive and we are constantly expanding our coverage, sometimes  we are unable to cover all the matches that are of interest to the client.   
In such cases, we return an error that the widget could not be loaded. You can also find a more detailed description of the error in the developer tools console.

For some events, you can experience error message saying “widget could not be loaded”.

This error is usually caused by lack of mapping for a certain event. If STATSCORE is not providing such an event, and you will check console panel, there would be message: `'Mapping for provided event id does not exist'`

To prevent your clients from widget with error message, you can use special code to hide widget without mapping. Here are example of code you can use to achieve that:

```
widget.on('error', (error) => {   if (error.message.includes('Mapping for provided event id does not exist')) {      element.style.display = 'none';   } });
```

 

```
widget.on('error', async (error) => {   if (error.message.includes('Mapping for provided event id does not exist')) {      await widget.destroy();   } });
```

 

- [LivematchPro](https://knowledge-base.statscore.com/knowledge-base/livematchpro?hsLang=en#main-content)

    - [Product scope](https://knowledge-base.statscore.com/knowledge-base/livematchpro?hsLang=en#product-scope)
    - [Integration - how to start](https://knowledge-base.statscore.com/knowledge-base/livematchpro?hsLang=en#integration-how-to-start)
    - [Support](https://knowledge-base.statscore.com/knowledge-base/livematchpro?hsLang=en#support)
- [PrematchPro](https://knowledge-base.statscore.com/knowledge-base/prematchpro?hsLang=en#main-content)

    - [Product scope](https://knowledge-base.statscore.com/knowledge-base/prematchpro?hsLang=en#product-scope)
- [SportsAPI](https://knowledge-base.statscore.com/knowledge-base/sportsapi?hsLang=en#main-content)

    - [Integration](https://knowledge-base.statscore.com/knowledge-base/sportsapi?hsLang=en#integration)
    - [Documentation](https://knowledge-base.statscore.com/knowledge-base/sportsapi?hsLang=en#documentation)
    - [Integration - how to start](https://knowledge-base.statscore.com/knowledge-base/sportsapi?hsLang=en#integration-how-to-start)
- [TipsterAPI](https://knowledge-base.statscore.com/knowledge-base/tipsterapi?hsLang=en#main-content)

    - [Integration - how to start](https://knowledge-base.statscore.com/knowledge-base/tipsterapi?hsLang=en#integration-how-to-start)
- [ScoutsFeed](https://knowledge-base.statscore.com/knowledge-base/scoutsfeed?hsLang=en#main-content)

    - [Integration - how to start](https://knowledge-base.statscore.com/knowledge-base/scoutsfeed?hsLang=en#integration-how-to-start)

[![STATSCORE-logo-CUST\_PORTAL](https://knowledge-base.statscore.com/hs-fs/hubfs/statscore-logo-purple-500.png?width=200&height=60&name=statscore-logo-purple-500.png "STATSCORE-logo-CUST_PORTAL")](https://www.statscore.com/)

<https://www.facebook.com/statscore> <https://twitter.com/statscore> <https://www.instagram.com/statscore_com/> [mailto:support@statscore.com](mailto:support@statscore.com)

Copyright © 2025, Statscore