fix code vs status in store errors

This commit is contained in:
Mikaël Cluseau
2023-05-15 19:27:36 +02:00
parent a8ccb6990b
commit dac6613646
3 changed files with 33 additions and 32 deletions

View File

@ -59,8 +59,8 @@ func openSecretStore() {
var (
unlockMutex = sync.Mutex{}
ErrStoreAlreadyUnlocked = httperr.NewStd(http.StatusConflict, 1, "store already unlocked")
ErrInvalidPassphrase = httperr.NewStd(http.StatusBadRequest, 2, "invalid passphrase")
ErrStoreAlreadyUnlocked = httperr.NewStd(1, http.StatusConflict, "store already unlocked")
ErrInvalidPassphrase = httperr.NewStd(2, http.StatusBadRequest, "invalid passphrase")
)
func unlockSecretStore(passphrase []byte) (err httperr.Error) {