Logic app Standard - Unit Testing exception when terminate with custom error code
I maintainer di solito rispondono entro 1 giorno
@andrew-eldridge ci sta già lavorando.
Dal 7/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Severity
P3 - Medium (Minor functionality affected)
Describe the Bug with repro steps
Unit-testing SDK throws on workflows that Terminate with a custom (non-enum) error code
Summary
UnitTestExecutor.RunWorkflowAsync throws System.ArgumentException: Requested value '<code>' was not found. instead of returning a Failed TestWorkflowRun whenever the workflow run ends with a runError.code (or an action error code) that is not a member of the ErrorResponseCode enum.
Custom Terminate error codes are valid at runtime in Logic Apps Standard (the code field is a free-form string), so this makes it impossible to unit-test any error/Catch path that terminates with a domain-specific code.
Repro
-
Author a Stateful workflow with a Try/Catch pattern whose Catch terminates the run:
"Terminate_-_Failed": { "type": "Terminate", "inputs": { "runStatus": "Failed", "runError": { "code": "@variables('ErrorCode')", "message": "@variables('ErrorMessage')" } } }
where ErrorCode resolves to a custom string, e.g. "PublisherDeliveryFailed_APICallFailed".
-
Mock the actions so the run reaches
Terminate_-_Failed, then:var run = await executor.Create().RunWorkflowAsync(testMock: mockData);
What type of Logic App Is this happening in?
Standard (VSCode)
Are you experiencing a regression?
No response
Which operating system are you using?
Windows
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
Screenshots or Videos
No response
Environment
- Package:
Microsoft.Azure.Workflows.WebJobs.Tests.Extension1.0.3 (latest on NuGet) - Target framework:
net8.0 - Test framework: MSTest
Additional context
Requested value 'PublisherDeliveryFailed_APICallFailed' was not found.
at Microsoft.Azure.Workflows.UnitTesting.TestHost.UnitTestEngine.ExecuteWorkflow(FlowPropertiesDefinition workflowDefinition, TriggerMock triggerMock, Dictionary`2 actionMocks, String appDirectory, String connections, String parameters, IDictionary`2 localSettings, String customCodeFunctionFilePath, Int32 timeoutInSeconds)
at Microsoft.Azure.Workflows.UnitTesting.TestHost.UnitTestEngine.ExecuteWorkflow(FlowPropertiesDefinition workflowDefinition, TriggerMock triggerMock, Dictionary`2 actionMocks, String appDirectory, String connections, String parameters, IDictionary`2 localSettings, String customCodeFunctionFilePath, Int32 timeoutInSeconds)
at Microsoft.Azure.Workflows.UnitTesting.UnitTestExecutor.RunWorkflowAsync(TestMockDefinition testMock, Int32 timeoutInSeconds)
at Integration.Erp04.LogicApps.Tests.Failed_Run.RunAndCaptureAsync(String mockName) in C:\Repo\CHC.Integration.ERP\tests\erp04\Integration.Erp04.LogicApps\int22svc01p01-residentmovements-ecase-pub\Failed-Run\Failed-Run.cs:line 100
- Lingua principale
- TypeScript
- Stelle
- 114
- Fork
- 115
- Merge medio
- 1g 3h
- PR unite (30g)
- 40
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/LogicAppsUX
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Azure/LogicAppsUX#9747 ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid helplink referenceForse già presa @Prefix42 l’ha presa 4 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
Azure/LogicAppsUX#9734 ·
I maintainer di solito rispondono entro 1 giorno
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Azure/LogicAppsUX#9594 ·
I maintainer di solito rispondono entro 1 giorno
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Azure/LogicAppsUX#9590 ·
I maintainer di solito rispondono entro 1 giorno
-
[Portal] In the Quick Start blade on Consumption Logic apps, the Get Started links are all brokenApertabug Portal priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Azure/LogicAppsUX#9505 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/LogicAppsUX
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ardia-browser/ardia#4778 ·
I maintainer di solito rispondono entro 1 giorno
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)Forse già presa @G-darshan-32 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
clipy-recorder/clipy#164 · 1 commento ·
-
bug from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nightly-labs/openbot#18462 ·
I maintainer di solito rispondono entro 1 giorno
-
Fast and light shell approval "Always allow" button shows raw English backticks and scrambles commands in ArabicForse già presa @tylerbea l’ha presa oggi. Apertaagent-ui bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Windows: Ctrl+C / Ctrl+V not working in chat input boxForse già presa @PranavTJ-05 l’ha presa oggi. Apertacomp/desktop desktop/chat desktop/shell os/windows P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NousResearch/hermes-agent#161023 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno