---
title: "finish(with:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avasynchronousvideocompositionrequest/finish(with:)"
---

# finish(with:)

Finishes the request with an error.

## Declaration

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

## Parameters

- `error`: Returns the error encountered during the compositing.

## Discussion

Discussion A custom compositor calls this method to indicate that the attempt to compose a frame failed.

## See Also

### Finishing the request

- [finish(withComposedVideoFrame:)](avfoundation/avasynchronousvideocompositionrequest/finish(withcomposedvideoframe:).md)
- [finish(withComposedPixelBuffer:)](avfoundation/avasynchronousvideocompositionrequest/finish(withcomposedpixelbuffer:).md)
- [finish(withComposedTaggedBuffers:)](avfoundation/avasynchronousvideocompositionrequest/finish(withcomposedtaggedbuffers:).md)
- [finishCancelledRequest()](avfoundation/avasynchronousvideocompositionrequest/finishcancelledrequest().md)
