Infrequent Error: getState: illegal access from outside of workflow context

Hi,

I’d Like Some Enlightenment On Why This Error Occurs Every Once In A While In Workflow Code.

Here’s An Example Workflow Code That Looks Just Like Mine:

package main

func testWorkflow(ctx workflow.Context, param string) (string, error) {
    var response string

    err := workflow.ExecuteActivity(ctx, testActivity, param).Get(ctx, &response)
    if err != nil {
        return nil, err
    }

    return response, nil
}

func testActivity(param string) (string, error) {
  return param, nil
}

Here’s A Stack Trace From Sentry: