Return CKError instead of custom error when encryption fails
This commit is contained in:
parent
c355464094
commit
a3672d28b3
1 changed files with 1 additions and 2 deletions
|
@ -15,7 +15,6 @@
|
||||||
package kvs
|
package kvs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/abcum/surreal/cnf"
|
"github.com/abcum/surreal/cnf"
|
||||||
|
@ -74,7 +73,7 @@ func (db *DB) enc(opts *cnf.Options) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if kv.Exists() == true && kv.Str() != "±" {
|
if kv.Exists() == true && kv.Str() != "±" {
|
||||||
err = fmt.Errorf("Please provide a valid encryption key for the stored data.")
|
err = new(CKError)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue