Skip to content

Commit 03d03ea

Browse files
committed
session: create errors.go file
And move an error here which we plan to use across DB types.
1 parent 88e4f2e commit 03d03ea

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

session/errors.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package session
2+
3+
import "errors"
4+
5+
var (
6+
// ErrSessionNotFound is an error returned when we attempt to retrieve
7+
// information about a session but it is not found.
8+
ErrSessionNotFound = errors.New("session not found")
9+
)

session/kvdb_store.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ var (
4949
// IDs associated with the given group ID.
5050
sessionIDKey = []byte("session-id")
5151

52-
// ErrSessionNotFound is an error returned when we attempt to retrieve
53-
// information about a session but it is not found.
54-
ErrSessionNotFound = errors.New("session not found")
55-
5652
// ErrDBInitErr is returned when a bucket that we expect to have been
5753
// set up during DB initialisation is not found.
5854
ErrDBInitErr = errors.New("db did not initialise properly")

0 commit comments

Comments
 (0)