> ## 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 `VideoAdError.noFill(reason:)` 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.

```swift theme={null}
do {
    pauseAd = try await ads.format(.pause)
} catch VideoAdError.noFill(let reason) {
    switch reason {
    case .noAdMatch: break             // no campaign fits this episode or viewer right now
    case .geoRestricted: break         // no ads served in the viewer's country
    default: break                     // 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.