RequestInterceptor
public protocol RequestInterceptor
a protocol intercepting a session request
-
shouldRescueRequest(_:
Asynchronouserror: ) catch and retry a failed request
Declaration
Swift
func shouldRescueRequest<Output>(_ request: Request<Output>, error: Error) async throws -> Bool
Return Value
nil if the request should not be retried. Otherwise a publisher that will be executed before retrying the request