Skip to content

Commit

Permalink
Merge pull request Mirantis#89 from mikekap/patch-1
Browse files Browse the repository at this point in the history
Return the right error code when the checkpoint isn't found
  • Loading branch information
evol262 authored Jul 18, 2022
2 parents 95c6c0f + a74794e commit 19442d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/checkpointmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 19442d1

Please sign in to comment.