Treat 400 from security code submission to be incorrect code

This commit is contained in:
Brandon Evans 2021-01-25 19:16:24 -07:00
parent 9508cda585
commit a04bfb39d0
No known key found for this signature in database
GPG key ID: D58A4B8DB64F8E93

View file

@ -126,7 +126,7 @@ public class Client {
switch urlResponse.statusCode { switch urlResponse.statusCode {
case 200..<300: case 200..<300:
return (data, urlResponse) return (data, urlResponse)
case 401: case 400, 401:
throw AuthenticationError.incorrectSecurityCode throw AuthenticationError.incorrectSecurityCode
case let code: case let code:
throw AuthenticationError.badStatusCode(code, data, urlResponse) throw AuthenticationError.badStatusCode(code, data, urlResponse)