title: how can i cast server error message to AFError
body: <p>i am unable to find some way to cast custom message to AFError</p>
  <pre><code>    class APIClient {
  @discardableResult
      static func performRequest&lt;T:Decodable&gt;(route:APIRouter, decoder: JSONDecoder = JSONDecoder(), completion:@escaping (Result&lt;T, AFError&gt;)-&gt;Void) -&gt; DataRequest {
          return AF.request(route).validate(statusCode: 200..&lt;300).responseDecodable(decoder: decoder) { (response: DataResponse&lt;T, AFError&gt;) in
  
              switch response.result {
              case .success(let value):
                  completion(.success(value))
              case .failure(let error):
                  let err = MYError(description: &quot;here goes some custom error message&quot;)
                  let customErr = err .asAFError
                  completion(.failure(customErr!))
                  
              }
      }
  }
  </code></pre>
  <p>and my custom error message struct</p>
  <pre><code>    struct MYError : Error{
  let description : String
  var localizedDescription: String {
      return NSLocalizedString(description, comment: &quot;&quot;)
  }
  </code></pre>