Skip to content

Commit

Permalink
fix: TaskCanceledException should be thrown when the task is canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
SlimeNull committed Apr 12, 2023
1 parent acf6e95 commit 844be0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenAI-DotNet/FineTuning/FineTuningEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ public async Task StreamFineTuneEventsAsync(string jobId, Action<Event> fineTune
var result = await CancelFineTuneJobAsync(jobId).ConfigureAwait(false);

if (!result)
{
throw new Exception($"Failed to cancel {jobId}");
}
else
throw new TaskCanceledException();
}
}

Expand Down

0 comments on commit 844be0c

Please sign in to comment.