lightning-terminal/session/errors.go
Elle Mouton 5ed5fd25fa
session: use error variables
In preparation for having the unit tests pass against a different Store
implementation, we standardize some of the errors that get returned.
2025-02-27 08:07:51 +02:00

21 lines
655 B
Go

package session
import "errors"
var (
// ErrSessionNotFound is an error returned when we attempt to retrieve
// information about a session but it is not found.
ErrSessionNotFound = errors.New("session not found")
// ErrUnknownGroup is returned when an attempt is made to insert a
// session and link it to an existing group where the group is not
// known.
ErrUnknownGroup = errors.New("unknown group")
// ErrSessionsInGroupStillActive is returned when an attempt is made to
// insert a session and link it to a group that still has other active
// sessions.
ErrSessionsInGroupStillActive = errors.New(
"group has active sessions",
)
)