Skip to content

Commit

Permalink
[Fix/#375] status Code 범위 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed Jul 19, 2024
1 parent a2520c9 commit 872782b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YELLO-iOS/YELLO-iOS/Network/Base/APIRequestLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class APIRequestLoader<T: TargetType> {

private func judgeStatus<M: Decodable>(by statusCode: Int, _ data: Data, type: M.Type) -> NetworkResult<M> {
switch statusCode {
case 200...299, 403: return isValidData(data: data, type: M.self)
case 400, 405...499: return .requestErr(statusCode: statusCode)
case 200...299, 403, 404: return isValidData(data: data, type: M.self)
case 400, 402, 405...499: return .requestErr(statusCode: statusCode)
case 500: return .serverErr(statusCode: statusCode)
case 401: return .failure
default: return .networkErr
Expand Down

0 comments on commit 872782b

Please sign in to comment.