title: WKWebView doesn't react to 503 error
body: <p>I am loading an url request in my <code>WKWebView</code>.</p>
  
  <p>Charles shows me <code>Response Code: 503 Error</code> which is fine, because it should be unavailable, but</p>
  
  <pre><code>webView(_:didFail:withError:) 
  webView(_:decidePolicyFor:decisionHandler:)
  </code></pre>
  
  <p>functions are never called. </p>
  
  <p>What should I do to handle this error response? I think delegates are set up properly.</p>
  
  <pre><code>import UIKit
  import WebKit
  
  class WebKitViewController: UIViewController, WKUIDelegate, WKNavigationDelegate {
  
      var urlRequest: URLRequest?
  
      var webView: WKWebView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          webView.navigationDelegate = self
  
          if let urlRequest = urlRequest {
              webView?.load(urlRequest)
          }
      }
  
      override func loadView() {
          super.loadView()
          webView = WKWebView(frame: .zero)
          view.addSubview(webView)
          webView.uiDelegate = self
          //constraints
      }
  
      func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
      }
  
      func webView(_ webView: WKWebView, didFinishProvisionalNavigation navigation: WKNavigation!) {
      }
  
      func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
      }
  
      func webView(_ webView: UIWebView, didFailLoadWithError error: Error) {
          //not called while request gets 503 error
      }
  
      func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -&gt; Void) {
          //not called while request gets 503 error
      }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong> <code>func webView(_ webView: UIWebView, didFailLoadWithError error: Error)</code> is total blunder. Skip that one.</p>