Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix some errors with rule identifiers #180

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Temporalio/Worker/WorkflowWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private async Task HandleActivationAsync(IPayloadCodec? codec, WorkflowActivatio
// deadlocked and just rethrow the same exception as before
if (deadlockedWorkflows.ContainsKey(act.RunId))
{
throw new InvalidOperationException($"Workflow with ID {act.RunId} deadlocked after {deadlockTimeout}");
throw new InvalidOperationException($"[TMPRL1101] Workflow with ID {act.RunId} deadlocked after {deadlockTimeout}");
}

// If the workflow is not yet running, create it. We know that we will only get
Expand Down Expand Up @@ -167,7 +167,7 @@ private async Task HandleActivationAsync(IPayloadCodec? codec, WorkflowActivatio
// next activation which will be a remove job.
deadlockedWorkflows[act.RunId] = workflowTask;
throw new InvalidOperationException(
$"Workflow with ID {act.RunId} deadlocked after {deadlockTimeout}");
$"[TMPRL1101] Workflow with ID {act.RunId} deadlocked after {deadlockTimeout}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe re-use this format string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh, just a couple of places for the string literal, I don't think it's worth extracting

}
// Cancel deadlock timeout timer since we didn't hit it
timeoutCancel.Cancel();
Expand Down
Loading