---
title: "webView(_:didFailProvisionalLoadWithError:for:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webframeloaddelegate/webview(_:didfailprovisionalloadwitherror:for:)"
---

# webView(_:didFailProvisionalLoadWithError:for:)

Called if an error occurs when starting to load data for a page.

## Declaration

```swift
optional func webView(_ sender: WebView!, didFailProvisionalLoadWithError error: (any Error)!, for frame: WebFrame!)
```

## Parameters

- `sender`: The web view containing the frame.
- `error`: Specifies the type of error that occurred during the load.
- `frame`: The frame being loaded.

## Discussion

Discussion The frame continues to display the committed data source if there is one.
