fix: recursive call of process(request:errorHandlers:mapMoyaError)

This commit is contained in:
Ivan Smolin 2022-03-29 12:47:41 +03:00
parent 7def493512
commit f0f29a4464
2 changed files with 4 additions and 4 deletions

View File

@ -31,8 +31,8 @@ open class DefaultRecoverableJsonNetworkService<ApiError: Decodable & Error>: De
private(set) public var defaultErrorHandlers: [ErrorHandler] = []
public func process<B: Encodable, S: Decodable>(request: EndpointRequest<B, S>,
prependErrorHandlers: [ErrorHandler] = [],
appendErrorHandlers: [ErrorHandler] = [],
prependErrorHandlers: [ErrorHandler],
appendErrorHandlers: [ErrorHandler],
mapMoyaError: @escaping Closure<MoyaError, ApiError>) async -> Result<S, ApiError> {
await process(request: request,
@ -41,7 +41,7 @@ open class DefaultRecoverableJsonNetworkService<ApiError: Decodable & Error>: De
}
public func process<B: Encodable, S: Decodable>(request: EndpointRequest<B, S>,
errorHandlers: [ErrorHandler] = [],
errorHandlers: [ErrorHandler],
mapMoyaError: @escaping Closure<MoyaError, ApiError>) async -> Result<S, ApiError> {
let result = await process(request: request, mapMoyaError: mapMoyaError)

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2021 Touch Instinct
// Copyright (c) 2022 Touch Instinct
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the Software), to deal