Skip to content

Commit

Permalink
[Fix] Runnect#129 - 토큰 재발급 API에서 401이 왔을 때는 retry 하지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj8706 committed Apr 28, 2023
1 parent e577f1b commit 86a50a7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ final class AuthInterceptor: RequestInterceptor {

func retry(_ request: Request, for session: Session, dueTo error: Error, completion: @escaping (RetryResult) -> Void) {
print("retry 진입")
guard let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401
guard let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401, let pathComponents = request.request?.url?.pathComponents,
!pathComponents.contains("getNewToken")
else {
completion(.doNotRetryWithError(error))
return
Expand Down

0 comments on commit 86a50a7

Please sign in to comment.