How to set NonRetryableErrorTypes?

I have custom errors in my activity:

var SomeError = errors.New("My error text")

And i set it in NonRetryableErrorTypes. I try to do it:

NonRetryableErrorTypes: []string{
  fmt.Sprint(activity.SomeError),
},

But it does not work and activity return this error:

{
  "message": "My error text",
  "source": "GoSDK",
  "stackTrace": "",
  "encodedAttributes": null,
  "cause": null,
  "applicationFailureInfo": {
    "type": "fundamental",
    "nonRetryable": false,
    "details": null
  }
}

Temporal looks at the error type, not the variable name. You either need to create a new error type or explicitly create an ApplicationError using temporal.NewApplicationError. This is done as errors have to be passed across process boundaries and in some cases across different programming languages.