From a04bfb39d0d9a6cdeea822d4a46c88ae63d81533 Mon Sep 17 00:00:00 2001 From: Brandon Evans Date: Mon, 25 Jan 2021 19:16:24 -0700 Subject: [PATCH] Treat 400 from security code submission to be incorrect code --- Xcodes/AppleAPI/Sources/AppleAPI/Client.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xcodes/AppleAPI/Sources/AppleAPI/Client.swift b/Xcodes/AppleAPI/Sources/AppleAPI/Client.swift index 21dd487..18569b1 100644 --- a/Xcodes/AppleAPI/Sources/AppleAPI/Client.swift +++ b/Xcodes/AppleAPI/Sources/AppleAPI/Client.swift @@ -126,7 +126,7 @@ public class Client { switch urlResponse.statusCode { case 200..<300: return (data, urlResponse) - case 401: + case 400, 401: throw AuthenticationError.incorrectSecurityCode case let code: throw AuthenticationError.badStatusCode(code, data, urlResponse)