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

# webView(_:didFailLoadWithError:for:)

Called when an error occurs loading a committed data source.

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

## Parameters

`sender`

The web view containing the frame.

`error`

The type of error that occurred during the load.

`frame`

The frame being loaded.

## Discussion

This method is called after the data source has been committed but resulted in an error.

---

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)