Query Completed Workflow

According to the docs, a completed workflow will return its final result if queried

We put our temporal cluster under a bit of load and a finished workflow answered with

“operation GetCurrentExecution encounter not found”

But now its answering fine

It says it can return either of these
image

Did it actually return a EntityNotExistError ? Weird.

Which documentation are you seeing this? The list at client package - go.temporal.io/sdk/client - Go Packages for QueryWorkflow should be:

	//  - serviceerror.InvalidArgument
	//  - serviceerror.Internal
	//  - serviceerror.Unavailable
	//  - serviceerror.NotFound
	//  - serviceerror.QueryFailed

The error can be checked for what type it is. Can you replicate this easily? A completed workflow should be queryable if it is otherwise available. Is the “completed” workflow potentially on a cron or scheduled for another execution via continue-as-new? There is a known issue querying a scheduled-but-not-started workflow.