   }
 
   /// Recovers failure of this future if there is one with contextual transformer.
+  func recover<E: Swift.Error, C: ExecutionContext>(
+    from specificError: E,
+    context: C,
+    executor: Executor? = nil,
+    _ transform: @escaping (C, E) throws -> Success
+    ) -> Future<Success> where E: Equatable
+  {
+    return self.recover(context: context, executor: executor) {
+      (context, error) in
+      if let myError = error as? E, myError == specificError {
+        return try transform(context, myError)
+      } else {
+        throw error
+      }
+    }
+  }
+  
+  /// 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> {
+    ) -> 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 with contextual transformer.
+  /// Flattens future returned by the transform
+  func flatRecover<E: Swift.Error, C: ExecutionContext>(
+    from specificError: E,
+    context: C,
+    executor: Executor? = nil,
+    _ transform: @escaping (C, Swift.Error) throws -> Future<Success>
+    ) -> Future<Success> where E: Equatable
+  {
+    return self.flatRecover(context: context, executor: executor) {
+      (context, error) in
+      if let myError = error as? E, myError == specificError {
+        return try transform(context, myError)
+      } else {
+        throw error
+      }
     }
   }
 }


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

    let handler = self.makeCompletionHandler(executor: executor) {
      [weak promise] (completion, originalExecutor) -> Void in
      guard case .some = promise else { return }
      
      switch completion {
      case let .success(success):
        promise?.succeed(success, from: originalExecutor)
