<!--
{
  "availability" : [
    "iOS: 2.0.0 - 12.0.0",
    "iPadOS: 2.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWebViewDelegate/webView(_:didFailLoadWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIWebViewDelegate(im)webView:didFailLoadWithError:"
  },
  "title" : "webView(_:didFailLoadWithError:)"
}
-->

# webView(_:didFailLoadWithError:)

Sent if a web view failed to load a frame.

```
optional func webView(_ webView: UIWebView, didFailLoadWithError error: any Error)
```

## Parameters

`webView`

The web view that failed to load a frame.

`error`

The error that occurred during loading.

---

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)