forked from loafle/openapi-generator-original
Merge pull request #2613 from tomekc/swift-validate-response
[swift] Check server response and fail request in case of non-2xx response
This commit is contained in:
@@ -75,7 +75,7 @@ class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
||||
request.authenticate(usingCredential: credential)
|
||||
}
|
||||
|
||||
request.responseJSON(options: .AllowFragments) { response in
|
||||
request.validate().responseJSON(options: .AllowFragments) { response in
|
||||
managerStore.removeValueForKey(managerId)
|
||||
|
||||
if response.result.isFailure {
|
||||
|
||||
Reference in New Issue
Block a user