Error during fetching Details from temporal NonRetryableApplicationError

In one of my temporal activities, I am returning

appErr := temporal.NewNonRetryableApplicationError("message", "status", err, "data")
return data, appErr

In the workflow, which calls the activity,

err = workflow.ExecuteActivity(ctx, c.Activity, request, details).Get(ctx, &details) 
	if err != nil {
		var appErr *temporal.ApplicationError
	        if errors.As(err, &appErr) {
                       fmt.Println(appErr.HasDetails()) ------> returns false
			tempErr := appErr.Details(&data)
                        fmt.Println(data)-------------------------------> returns [ ] (empty)
			if tempErr!= nil{
				logger.Error("Application error")
				return tempErr
			}
		}
		return err
	}

There is an error in appErr.Details with error being returned as “no data available”.
Is there anything that I am missing?

Even though details is set in the NewNonRetryableApplicationError object, I am not able to fetch the details and put it in

I would like some help in how to fetch the details field that has been set in the NewNonRetryableApplicationError.

Duplicate of Fetching Details from temporal NonRetryableApplicationError, please see response there.

Thank you for the response. I have checked the response and I am having the same changes in code base. When i try printing the hasDetails() it is giving as false and the data is populating after the call appErr.Details(&data).

Could you pls help in resolving this issue.

Do you see details in the ActivityTaskFailed event in the workflow history?