<!--
{
  "availability" : [
    "iOS: 9.0.0 - 27.0.0",
    "iPadOS: 9.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.11.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAsynchronousCIImageFilteringRequest/finish(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAsynchronousCIImageFilteringRequest(im)finishWithError:"
  },
  "title" : "finish(with:)"
}
-->

# finish(with:)

Notifies AVFoundation that you cannot fulfill the image filtering request.

```
func finish(with error: any Error)
```

## Parameters

`error`

An error object describing the reason to

## Discussion

Call this method if you cannot process the input image and wish to abort playback as a result—for example, if the <doc://com.apple.documentation/documentation/CoreImage/CIFilter-swift.class/outputImage> object from your filter chain is nil. (If instead you want to fall back to rendering an unfiltered image, call the [`finish(with:context:)`](/documentation/AVFoundation/AVAsynchronousCIImageFilteringRequest/finish(with:context:)) and pass the [`sourceImage`](/documentation/AVFoundation/AVAsynchronousCIImageFilteringRequest/sourceImage) object to the `filteredImage` parameter.)

Calling this method causes AVFoundation to post a notification named [`failedToPlayToEndTimeNotification`](/documentation/AVFoundation/AVPlayerItem/failedToPlayToEndTimeNotification). Observers of this notification can use the [`AVPlayerItemFailedToPlayToEndTimeErrorKey`](/documentation/AVFoundation/AVPlayerItemFailedToPlayToEndTimeErrorKey) key to examine the error you provide.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)