diff --git a/warp/account.go b/warp/account.go index 16d4a5ce0..8b6443a7f 100644 --- a/warp/account.go +++ b/warp/account.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "encoding/json" + "errors" "fmt" "io" "log/slog" @@ -355,6 +356,10 @@ func LoadIdentity(path string) (Identity, error) { return Identity{}, err } + if len(i.Config.Peers) < 1 { + return Identity{}, errors.New("identity contains 0 peers") + } + return *i, nil }