Created
September 26, 2017 01:32
-
-
Save keitaoouchi/e3dcdfd0864b98f703066789b026cf7f to your computer and use it in GitHub Desktop.
moya_status_code.swift
This file contains 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
extension MoyaError { | |
var is401: Bool { | |
switch self { | |
case .underlying( | |
Alamofire.AFError.responseValidationFailed( | |
Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(401) | |
) | |
): return true | |
default: | |
return false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment