---
title: "webView(_:didFailLoadWithError:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiwebviewdelegate/webview(_:didfailloadwitherror:)"
---

# webView(_:didFailLoadWithError:)

Sent if a web view failed to load a frame.

## Declaration

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

## See Also

### Loading Content

- [webView(_:shouldStartLoadWith:navigationType:)](uikit/uiwebviewdelegate/webview(_:shouldstartloadwith:navigationtype:).md)
- [webViewDidStartLoad(_:)](uikit/uiwebviewdelegate/webviewdidstartload(_:).md)
- [webViewDidFinishLoad(_:)](uikit/uiwebviewdelegate/webviewdidfinishload(_:).md)
