From d406e43b25573b0851d3b59ee018fe38f045a8e4 Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Thu, 19 Oct 2023 11:03:06 -0400 Subject: [PATCH] Fixes Add Cancelling state for jobs #121 --- src/Serval.Client/Client.g.cs | 2 +- .../Controllers/TranslationEnginesController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Serval.Client/Client.g.cs b/src/Serval.Client/Client.g.cs index 239a678c..658d37da 100644 --- a/src/Serval.Client/Client.g.cs +++ b/src/Serval.Client/Client.g.cs @@ -3008,7 +3008,7 @@ public string BaseUrl if (status_ == 409) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ServalApiException("There is already an active/pending build", status_, responseText_, headers_, null); + throw new ServalApiException("There is already an active or pending build or a build in the process of being canceled", status_, responseText_, headers_, null); } else if (status_ == 503) diff --git a/src/Serval.Translation/Controllers/TranslationEnginesController.cs b/src/Serval.Translation/Controllers/TranslationEnginesController.cs index 689cfd58..3952dff9 100644 --- a/src/Serval.Translation/Controllers/TranslationEnginesController.cs +++ b/src/Serval.Translation/Controllers/TranslationEnginesController.cs @@ -783,7 +783,7 @@ CancellationToken cancellationToken /// The client is not authenticated /// The authenticated client does not own the translation engine /// The engine does not exist - /// There is already an active/pending build + /// There is already an active or pending build or a build in the process of being canceled /// A necessary service is currently unavailable. Check `/health` for more details. [Authorize(Scopes.UpdateTranslationEngines)] [HttpPost("{id}/builds")]