<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebFrameLoadDelegate/webView(_:didFailProvisionalLoadWithError:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebFrameLoadDelegate(im)webView:didFailProvisionalLoadWithError:forFrame:"
  },
  "title" : "webView(_:didFailProvisionalLoadWithError:for:)"
}
-->

# webView(_:didFailProvisionalLoadWithError:for:)

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

```
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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)