Skip to content

Commit ddf41af

Browse files
authored
Cleanup back-compat code for interpreting Run Service status codes (actions#3456)
1 parent 0b0cb55 commit ddf41af

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

Diff for: src/Sdk/RSWebApi/RunServiceHttpClient.cs

-23
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ public async Task<AgentJobRequestMessage> GetJobMessageAsync(
107107
}
108108
}
109109

110-
// Temporary back compat
111-
switch (result.StatusCode)
112-
{
113-
case HttpStatusCode.NotFound:
114-
throw new TaskOrchestrationJobNotFoundException($"Job message not found: {messageId}");
115-
case HttpStatusCode.Conflict:
116-
throw new TaskOrchestrationJobAlreadyAcquiredException($"Job message already acquired: {messageId}");
117-
}
118-
119110
if (!string.IsNullOrEmpty(result.ErrorBody))
120111
{
121112
throw new Exception($"Failed to get job message: {result.Error}. {Truncate(result.ErrorBody)}");
@@ -171,13 +162,6 @@ public async Task CompleteJobAsync(
171162
}
172163
}
173164

174-
// Temporary back compat
175-
switch (result.StatusCode)
176-
{
177-
case HttpStatusCode.NotFound:
178-
throw new TaskOrchestrationJobNotFoundException($"Job not found: {jobId}");
179-
}
180-
181165
if (!string.IsNullOrEmpty(result.ErrorBody))
182166
{
183167
throw new Exception($"Failed to complete job: {result.Error}. {Truncate(result.ErrorBody)}");
@@ -225,13 +209,6 @@ public async Task<RenewJobResponse> RenewJobAsync(
225209
}
226210
}
227211

228-
// Temporary back compat
229-
switch (result.StatusCode)
230-
{
231-
case HttpStatusCode.NotFound:
232-
throw new TaskOrchestrationJobNotFoundException($"Job not found: {jobId}");
233-
}
234-
235212
if (!string.IsNullOrEmpty(result.ErrorBody))
236213
{
237214
throw new Exception($"Failed to renew job: {result.Error}. {Truncate(result.ErrorBody)}");

0 commit comments

Comments
 (0)