From a74794e057380eebf631f31c0f81ad60dcb2b251 Mon Sep 17 00:00:00 2001 From: Mike Kaplinskiy Date: Wed, 6 Jul 2022 21:23:15 -0700 Subject: [PATCH] Rewrite the error code when the checkpoint isn't found --- store/checkpointmanager.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/store/checkpointmanager.go b/store/checkpointmanager.go index 1df049b26..e179c3e27 100644 --- a/store/checkpointmanager.go +++ b/store/checkpointmanager.go @@ -81,6 +81,9 @@ func (manager *checkPointImpl) GetCheckpoint(checkpointKey string, checkpoint Ch defer manager.mutex.Unlock() blob, err := manager.store.Read(checkpointKey) if err != nil { + if err == ErrKeyNotFound { + return ErrCheckpointNotFound + } return err } err = checkpoint.UnmarshalCheckpoint(blob)