> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Handling no-fill

> What to do when there is no ad for a format: the reasons, and when to ask again.

`format()` throws `VideoAdException.NoFill` when the server has nothing for the format. It is not a failure and the SDK never retries by itself; ask again at a later moment.

```kotlin theme={null}
try {
    pauseAd = ads.format(AdFormat.PAUSE)
} catch (e: VideoAdException.NoFill) {
    when (e.reason) {
        NoFillReason.NoAdMatch -> {}           // no campaign fits this episode or viewer right now
        NoFillReason.GeoRestricted -> {}       // no ads served in the viewer's country
        else -> {}                             // FrequencyCap, ContentUnsafe, TemporaryError, …
    }
}
```

All of them mean the same for your code: no ad this time, ask again at the next moment. Log the reason if you want to see why fill is low. A malformed ad in the server's answer costs only its own format, as a no-fill with reason `Unknown`; a format the answer leaves out keeps the ad you already hold, unless it has expired: `format()` never returns an expired ad, and the call is then a no-fill with reason `Unknown`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.