go-redis/redis · error

redis.Scan(unsupported %s)

Error message

redis.Scan(unsupported %s)

What it means

Error "redis.Scan(unsupported %s)" thrown in go-redis/redis.

Source

Thrown at internal/hscan/hscan.go:206

	f.SetFloat(v)
	return nil
}

func decodeString(f reflect.Value, s string) error {
	f.SetString(s)
	return nil
}

func decodeSlice(f reflect.Value, s string) error {
	// []byte slice ([]uint8).
	if f.Type().Elem().Kind() == reflect.Uint8 {
		f.SetBytes([]byte(s))
	}
	return nil
}

func decodeUnsupported(v reflect.Value, s string) error {
	return fmt.Errorf("redis.Scan(unsupported %s)", v.Type())
}

View on GitHub (pinned to 36d97525cd)

Solutions

  1. Use a supported field type (string, int, bool, time.Time, or a type implementing BinaryUnmarshaler) in the scanned struct
  2. Implement encoding.BinaryUnmarshaler on custom field types

When it happens

Trigger: Thrown at internal/hscan/hscan.go:206 when the library encounters an invalid state.

Common situations: Keep HGETALL-scan structs limited to supported scalar field types.


AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06). Data as JSON: /data/errors/a55747cf5a7e421c.json. Report an issue: GitHub.