From 613597a84eafa919c6b89384c4dce300a83042c2 Mon Sep 17 00:00:00 2001 From: Julien Castets Date: Mon, 27 Jan 2025 17:44:58 +0100 Subject: [PATCH] caching: do not ignore unmarshalling errors --- caching/store.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/caching/store.go b/caching/store.go index 67735323..1b5f3117 100644 --- a/caching/store.go +++ b/caching/store.go @@ -20,7 +20,10 @@ func (ds *DBStore[K, V]) Get(idx int) (*btree.Node[K, int, V], error) { return nil, err } node := &btree.Node[K, int, V]{} - _ = msgpack.Unmarshal(bytes, node) + err = msgpack.Unmarshal(bytes, node) + if err != nil { + return nil, err + } return node, nil }