Skip to content

Commit 17ac534

Browse files
committed
refactor: 토큰 반환에 대한 에러 처리 개선
1 parent 3754ee4 commit 17ac534

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

DevLog/Infra/Common/InfraLayerError.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ enum EmailFetchError: Error, Equatable {
3838
}
3939
}
4040

41+
enum TokenError: Error {
42+
case invalidResponse
43+
}
44+
4145
enum SocialLoginError: Error {
4246
case invalidOAuthState
4347
case failedToStartWebAuthenticationSession

DevLog/Infra/Service/SocialLogin/GithubAuthenticationService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ final class GithubAuthenticationService: NSObject, AuthenticationService {
223223
let customToken = data["customToken"] as? String {
224224
return (accessToken, customToken)
225225
}
226-
throw URLError(.badServerResponse)
226+
throw TokenError.invalidResponse
227227
} catch {
228228
throw mapRequestTokensError(error)
229229
}

0 commit comments

Comments
 (0)