Repository navigation
Fix misleading "not found" error when workflow/activity activation fails due to missing DI dependency - #1781
Merged
WhitWaldo merged 4 commits intoApr 14, 2026
Conversation
… not-found errors Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/c8f56699-b71e-42a4-9539-3de6638c6577 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1781 +/- ##
==========================================
+ Coverage 61.18% 61.20% +0.01%
==========================================
Files 285 285
Lines 8405 8405
Branches 974 974
==========================================
+ Hits 5143 5144 +1
Misses 3026 3026
+ Partials 236 235 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WhitWaldo
marked this pull request as ready for review
April 14, 2026 17:25
This was referenced Apr 20, 2026
This was referenced Apr 27, 2026
This was referenced May 11, 2026
This was referenced May 11, 2026
This was referenced May 18, 2026
This was referenced Jun 2, 2026
This was referenced Jun 15, 2026
This was referenced Jun 22, 2026
This was referenced Jul 6, 2026
This was referenced Jul 27, 2026
This was referenced Aug 19, 2026
This was referenced Sep 11, 2026
Open
This was referenced Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a registered workflow or activity fails to activate (e.g., a constructor dependency isn't registered in DI), the runtime was swallowing the real exception and reporting
WorkflowNotFound/ActivityNotFoundException— pointing developers in completely the wrong direction.Changes
IWorkflowsFactory— Addedout Exception? activationExceptiontoTryCreateWorkflowandTryCreateActivity, enabling callers to distinguish "not registered" (null) from "registered but failed to activate" (exception set)WorkflowsFactory— PopulatesactivationExceptionwhen the factory delegate throws; leaves itnullwhen the name isn't in the registryWorkflowWorker— ChecksactivationExceptionon failure; routes to a distinct error type/message (e.g.System.InvalidOperationException) instead of the generic "not found" pathLogging.cs— AddedLogWorkerWorkflowHandleOrchestratorRequestActivationFailedandLogWorkerWorkflowHandleActivityRequestActivationFailedTryCreate*for new signature; enhanced existing "factory throws" tests to assertactivationExceptionis populated; added new worker-level tests for both workflow and activity activation failure pathsBefore:
Activity 'SendEmailActivity' not foundAfter:
Activity 'SendEmailActivity' failed to activate: No service for type 'IEmailSender' has been registered.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1775
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: