refactor(session): extract inactive session error

This commit is contained in:
Trong Huu Nguyen
2023-06-09 12:16:06 +02:00
parent 248a0fab81
commit cbfa3fe2e2
2 changed files with 2 additions and 1 deletions

View File

@@ -113,7 +113,7 @@ func (in *Data) Validate() error {
}
if in.Metadata.IsTimedOut() {
return fmt.Errorf("%w: is inactive", ErrInvalid)
return fmt.Errorf("%w: %w", ErrInvalid, ErrInactive)
}
return nil

View File

@@ -13,6 +13,7 @@ import (
)
var (
ErrInactive = errors.New("is inactive")
ErrInvalid = errors.New("session is invalid")
ErrInvalidExternal = errors.New("session has invalid state at identity provider")
ErrNotFound = errors.New("not found")