Last active
March 23, 2021 23:17
-
-
Save karenxpn/e2b7966aff3c97b13e9a93c7e946424c to your computer and use it in GitHub Desktop.
Network Error for HTTP request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Alamofire | |
struct NetworkError: Error { | |
let initialError: AFError | |
let backendError: BackendError? | |
} | |
struct BackendError: Codable, Error { | |
var status: String | |
var message: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment