Go sdk AddSeachAttributes() api call not reporting errors

I am using the Go AddSeachAttributes() api call

The documentation indicates that the function:
Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists

But I am not getting any error when using the api to create an attribute with the same name as an existing attribute.

When the api call is made, the temporal runtime reports
time=2024-07-11T17:00:41.581 level=WARN msg="Search attribute TEST already exists." service=frontend namespace=default visibility-search-attribute=TEST
but no error is reported back to the caller.

Here is the code snippet:

request := &operatorservice.AddSearchAttributesRequest{
	Namespace:        data.Namespace.ValueString(),
	SearchAttributes: map[string]enums.IndexedValueType{data.Name.ValueString(): indexedValueType},
}
_, err := client.AddSearchAttributes(ctx, request)

if err != nil {
    // Execution never reaches here
	resp.Diagnostics.AddError("Request error", "Search attribute creation failed: "+err.Error())
	return
}

Would anyone know what the issue is?

cc: @Parin @Dipali