> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.poool.fr/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Poool Access - How to configure the behavior in case of errors?

In certain circumstances, an error may prevent communication with the Dashboard. The settings you have defined cannot be applied, and the user might be exposed to a default action.

These errors can be triggered by various factors: slow connection, browser issues, a page that takes too long to load, or third-party scripts causing interference.

On Poool's side, we do everything to maintain peak performance! Our average uptime is 99.99%. Feel free to subscribe to this alert to stay informed 👉 [https://status.poool.fr/](https://status.poool.fr/)

# Default behavior in case of an error

If we are unable to communicate with your Dashboard within 10 seconds, a timeout is triggered. A default paywall will appear, and we trigger the `onError` event.

On all **premium pages**, Poool's default paywall is a subscription paywall (content blocked), with the basic black-and-white appearance shown below:

[![](https://storage.crisp.chat/users/helpdesk/website/-/d/e/1/c/de1c5feeb19c0800/a993adad-b894-4201-9040-77b572_k73bh6.png)](https://downloads.intercomcdn.com/i/o/s22rivig/1214915955/065b05656593c4122bb0e3885a76/Capture+d%E2%80%99e%CC%81cran+2024-10-14+a%CC%80+11_06_48.png?expires=1773333000&signature=d9840d4251ebb6e17f31dce38ed82389168b3e8c45e0590a7987066ee082277b&req=dSImEsB%2FmIhaXPMW1HO4zT0JiubFvg73RWtD28ehCkpk7r7jHhty8AkCRsxh%0AFWCbg%2F7JyCug3qgJw1E%3D%0A)

💡 This default wall will be displayed on all your pages tagged as **premium**. If you use **free** contexts, with the `page_type: "free"`, the default paywall will appear, but no content blocking will be active.

To ensure that the user experience is maintained and that the blocking/unblocking of content aligns with your expectations, we describe here the actions available to you.

# Full content unblocking

If you wish to offer complete content access, you can configure the `onError` event to hide the widget and force the content to be unblocked.

```
access.on('error', (error, event) => {  
  $('#poool-widget').hide();  
  event.forceRelease();  
});
```

# Choosing the action for the default paywall

With the `onError` JS event, you can manage your own fallback as you wish.

We also provide the [`default_widget` configuration line](https://www.poool.dev/fr/docs/access/javascript/access/configuration#default_widget). This makes it easy to define the type of paywall you want to display in case of errors.

```
access.config('default_widget', 'gift');
```

Several values are possible for this default widget:

* `'invisible'`: In this case, you must force the unblocking as explained in the previous paragraph.
* `'unlock'`: Content is not blocked, and the automatic unlock banner is displayed at the bottom of the article.
* `'gift'`: The article is offered as a gift, and the article is unlocked upon clicking the button.
* `'subscription'`: Subscription wall, the default action loaded by Poool.

# Customizing the default paywall

Poool's default paywall is a basic, non-branded wall.

## Applying styles and setting text

You can customize your default paywall by applying styles and configuring your own texts using the following configuration lines:

```
access  
  .styles({  
    brand_logo: 'https://mon-media.fr/logo.png',  
    button_color: '#F00',  
  })  
  .texts({  
    no_thanks: 'No I\'m fine thanks',  
    subscription_title: 'This article is for you!'  
});
```

To change the texts, 👉 [here](https://www.poool.dev/en/docs/access/javascript/access/texts) are all the configuration lines available:

This graphical "safety" will allow you to maintain brand experience continuity under all circumstances.

## Display the correct subscription and login URLs

If the paywall cannot reach the server, it is likely that it will not retrieve the configured URLs (subscription page URL or login page URL) to provide them to the default paywall. Therefore, it is useful to add these URLs in the JS configuration to correctly redirect users:

### The URL to the subscription page

```
access.config('subscription_url', 'http://mysite.com/subscribe?return_url={return_url}&user_id={user_id}');
```

### The URL to the login page

```
access.config('login_url', 'http://mysite.com/login?return_url={return_url}&user_id={user_id}');
```

# How to test the default action?

To ensure that the action meets your expectations, we encourage you to test it! To do so, you need to block the API connection to simulate an error scenario.

For example, you can block the **API request domain** via the console (by blocking the "paywall" request) and check that the displayed element matches your expectations.

You can also find [our guide](https://www.poool.dev/en/guides/timeouts-and-errors) on this topic on the DevHub. Feel free to reach out to us if you have any questions!