     }
   }
 
+  /// Recovers failure of this future if there is one
+  func recover<E: Swift.Error>(
+    from specificError: E,
+    executor: Executor = .primary,
+    _ transform: @escaping (E) throws -> Success
+    ) -> Future<Success> where E: Equatable
+  {
+    return self.recover(executor: executor) {
+      if let myError = $0 as? E, myError == specificError {
+        return try transform(myError)
+      } else {
+        throw $0
+      }
+    }
+  }
+  
   /// Recovers failure of this future if there is one. Flattens future returned by the transform
   func flatRecover(
     executor: Executor = .primary,

  }

  /// Recovers failure of this future if there is one with contextual transformer.
  /// Flattens future returned by the transform
  func flatRecover<C: ExecutionContext>(
    context: C,
    executor: Executor? = nil,
    _ transform: @escaping (C, Swift.Error) throws -> Future<Success>
    ) -> Future<Success> {
    return self.flatRecover(executor: executor ?? context.executor) {
      [weak context] (failure) -> Future<Success> in
      guard let context = context else { throw AsyncNinjaError.contextDeallocated }
      return try transform(context, failure)
    }
  }
}


  /// Recovers failure of this future if there is one
  func recover(with success: Success) -> Future<Success> {
    return self
      .recover(executor: .immediate) { _ in success }
  }

  /// Recovers failure of this future if there is one
  func recover<E: Swift.Error>(
    from specificError: E,
    with success: Success
    ) -> Future<Success> where E: Equatable
  {
    return self.recover(executor: .immediate) {
      if let myError = $0 as? E,
        myError == specificError {
        return success
      } else {
        throw $0
      }
    }
  }
