70
saType, err = typeMap.getType(saName, customCategory|predefinedCategory)
71
if err != nil {
72
>
if sadefs.IsChasmSearchAttribute(saName) {
encode.go
73
// Chasm search attributes are not in the standard type map;
74
// allow them through with UNSPECIFIED type.
75
>
} else if errors.Is(err, sadefs.ErrInvalidName) {
encode.go
76
>
// SA not found in the type map. Fall through to DecodeValue with
77
>
// UNSPECIFIED type, which uses the payload's MetadataType as a
78
>
// fallback. This handles two cases:
79
>
// 1. Version mismatch: a newer server wrote a predefined SA that
80
>
// this server's constants don't recognize.
81
>
// 2. Cache lag: a recently registered custom SA that hasn't yet
82
>
// propagated to this server's SA manager cache.
83
>
// If MetadataType is also UNSPECIFIED (truly unknown payload),
84
>
// DecodeValue returns an error and the SA is excluded from the result.
85
>
} else {
86
lastErr = err
87
}