Use OrchestrationAlreadyExistsException instead of InvalidOperationException (#375)
This commit is contained in:
Родитель
3399888400
Коммит
5a2fdc3e38
|
@ -13,6 +13,7 @@ namespace DurableTask.Netherite
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Azure.Core;
|
using Azure.Core;
|
||||||
using DurableTask.Core;
|
using DurableTask.Core;
|
||||||
|
using DurableTask.Core.Exceptions;
|
||||||
using DurableTask.Core.History;
|
using DurableTask.Core.History;
|
||||||
using Microsoft.Azure.Storage;
|
using Microsoft.Azure.Storage;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
@ -473,7 +474,7 @@ namespace DurableTask.Netherite
|
||||||
// An instance in this state already exists.
|
// An instance in this state already exists.
|
||||||
if (this.host.Settings.ThrowExceptionOnInvalidDedupeStatus)
|
if (this.host.Settings.ThrowExceptionOnInvalidDedupeStatus)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"An Orchestration instance with the status {creationResponseReceived.ExistingInstanceOrchestrationStatus} already exists.");
|
throw new OrchestrationAlreadyExistsException($"An Orchestration instance with the status {creationResponseReceived.ExistingInstanceOrchestrationStatus} already exists.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче