From ddf41af7678a8bc585d9e6b8ab70d941cdb687b2 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Fri, 6 Sep 2024 17:04:17 -0500 Subject: [PATCH] Cleanup back-compat code for interpreting Run Service status codes (#3456) --- src/Sdk/RSWebApi/RunServiceHttpClient.cs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/Sdk/RSWebApi/RunServiceHttpClient.cs b/src/Sdk/RSWebApi/RunServiceHttpClient.cs index 14bdd2a63..2a1b0b998 100644 --- a/src/Sdk/RSWebApi/RunServiceHttpClient.cs +++ b/src/Sdk/RSWebApi/RunServiceHttpClient.cs @@ -107,15 +107,6 @@ namespace GitHub.Actions.RunService.WebApi } } - // Temporary back compat - switch (result.StatusCode) - { - case HttpStatusCode.NotFound: - throw new TaskOrchestrationJobNotFoundException($"Job message not found: {messageId}"); - case HttpStatusCode.Conflict: - throw new TaskOrchestrationJobAlreadyAcquiredException($"Job message already acquired: {messageId}"); - } - if (!string.IsNullOrEmpty(result.ErrorBody)) { throw new Exception($"Failed to get job message: {result.Error}. {Truncate(result.ErrorBody)}"); @@ -171,13 +162,6 @@ namespace GitHub.Actions.RunService.WebApi } } - // Temporary back compat - switch (result.StatusCode) - { - case HttpStatusCode.NotFound: - throw new TaskOrchestrationJobNotFoundException($"Job not found: {jobId}"); - } - if (!string.IsNullOrEmpty(result.ErrorBody)) { throw new Exception($"Failed to complete job: {result.Error}. {Truncate(result.ErrorBody)}"); @@ -225,13 +209,6 @@ namespace GitHub.Actions.RunService.WebApi } } - // Temporary back compat - switch (result.StatusCode) - { - case HttpStatusCode.NotFound: - throw new TaskOrchestrationJobNotFoundException($"Job not found: {jobId}"); - } - if (!string.IsNullOrEmpty(result.ErrorBody)) { throw new Exception($"Failed to renew job: {result.Error}. {Truncate(result.ErrorBody)}");