From 9230450bb725e4ce52b031009123205b679e27f0 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 8 Jun 2022 13:58:15 +0300 Subject: [PATCH] fix: code review notes --- .../DefaultCodeConfirmPresenter.swift | 16 +++++++--------- .../NetworkService/EndpointErrorResult.swift | 8 ++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/TIAuth/Sources/CodeConfirmPresenter/DefaultCodeConfirmPresenter.swift b/TIAuth/Sources/CodeConfirmPresenter/DefaultCodeConfirmPresenter.swift index 015301b0..bad77a05 100644 --- a/TIAuth/Sources/CodeConfirmPresenter/DefaultCodeConfirmPresenter.swift +++ b/TIAuth/Sources/CodeConfirmPresenter/DefaultCodeConfirmPresenter.swift @@ -74,15 +74,15 @@ open class DefaultCodeConfirmPresenter(input: Input, output: Output, requests: Requests, @@ -101,11 +101,9 @@ open class DefaultCodeConfirmPresenter: Error { - case apiError(AE) - case networkError(NE) +public enum EndpointErrorResult: Error { + case apiError(ApiError) + case networkError(NetworkError) } -public extension EndpointErrorResult where NE == MoyaError { +public extension EndpointErrorResult where NetworkError == MoyaError { var isNetworkConnectionProblem: Bool { guard case let .networkError(moyaError) = self, case let .underlying(error, _) = moyaError,