Skip to content

Commit

Permalink
Implement @pietrocaselani suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
marinofelipe committed Jun 14, 2020
1 parent 9ecb64e commit a3f8f39
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/HTTPClient/Handlers/HTTPResponseHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public struct HTTPResponseHandler: HTTPResponseHandling {
}
}

guard successfulStatusCodes.contains(response.statusCode) else {
return (isSucceeded: false, statusCode: response.statusCode)
}

return (isSucceeded: true, statusCode: response.statusCode)
return (isSucceeded: successfulStatusCodes.contains(response.statusCode), statusCode: response.statusCode)
}
}

0 comments on commit a3f8f39

Please sign in to comment.