From 128664b6779adb08c7a2a115fe1466264756b1d7 Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Mon, 11 Nov 2019 17:53:44 +0800 Subject: [PATCH] snapshots: return error if readSnapshot fails Signed-off-by: Wei Fu (cherry picked from commit 843423ec3887eb47ac70308cee9267ef6a1fa435) Signed-off-by: Wei Fu --- snapshots/storage/bolt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshots/storage/bolt.go b/snapshots/storage/bolt.go index 7716a591e0..3568c0cee2 100644 --- a/snapshots/storage/bolt.go +++ b/snapshots/storage/bolt.go @@ -297,7 +297,7 @@ func Remove(ctx context.Context, key string) (string, snapshots.Kind, error) { } if err := readSnapshot(sbkt, &id, &si); err != nil { - errors.Wrapf(err, "failed to read snapshot %s", key) + return errors.Wrapf(err, "failed to read snapshot %s", key) } if pbkt != nil {