Commit 24f002c
authored
Don't surface task cancellation as a transcription failure (#242)
When the pipeline's parent task is cancelled mid-transcription (a new
recording is started, the engine is torn down, the user toggles again, or
the 120s timeout task group cancels its sibling), the in-flight transcribe
throws a raw Swift.CancellationError. The generic catch treated it as a
real error and wrote a record reading:
Transcription Failed: The operation couldn't be completed.
(Swift.CancellationError error 1.)
Cancellation is normal control flow, not a failure. Catch CancellationError
(and the already-cancelled task case) explicitly: discard the empty pending
record, release resources, and return quietly instead of persisting a scary
failed entry. Also re-throw cancellation from the inner AI-enhancement catch
so it is handled the same way rather than relabelled 'Enhancement failed'.
Co-authored-by: thefourCraft <thefourCraft@users.noreply.github.com>1 parent e76a2b9 commit 24f002c
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
176 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
177 | 201 | | |
178 | 202 | | |
179 | 203 | | |
| |||
0 commit comments