github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kvstore/errors.go (about)

     1  package kvstore
     2  
     3  import "github.com/keybase/client/go/libkb"
     4  
     5  type KVCacheError struct {
     6  	Message string
     7  }
     8  
     9  func (e KVCacheError) Error() string {
    10  	return e.Message
    11  }
    12  
    13  func NewKVRevisionError(msg string) error {
    14  	if msg == "" {
    15  		msg = "revision out of date"
    16  	}
    17  	return libkb.AppStatusError{
    18  		Code: libkb.SCTeamStorageWrongRevision,
    19  		Name: "KVTeamStorageWrongRevision",
    20  		Desc: msg,
    21  	}
    22  }