Skip to content

Commit

Permalink
fix #144: statusCode에 따른 NetworkError가 그대로 전달되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
minsangKang committed Jul 7, 2024
1 parent 2c2ca7a commit 3091d08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Project_Timer/Data/TTProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extension Publisher {
/// Repository의 공통적인 Decode 에러를 반환하는 Publisher
func catchDecodeError() -> AnyPublisher<Self.Output, NetworkError> {
return self
.mapError { _ in NetworkError.DECODEERROR }
.mapError { error in return error as? NetworkError ?? .DECODEERROR }
.eraseToAnyPublisher()
}
}
Expand Down

0 comments on commit 3091d08

Please sign in to comment.