aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/actions/runner/runner.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/actions/runner/runner.go b/routers/api/actions/runner/runner.go
index cb206f5685..8df6f297ce 100644
--- a/routers/api/actions/runner/runner.go
+++ b/routers/api/actions/runner/runner.go
@@ -47,11 +47,11 @@ func (s *Service) Register(
runnerToken, err := actions_model.GetRunnerToken(ctx, req.Msg.Token)
if err != nil {
- return nil, errors.New("runner token not found")
+ return nil, errors.New("runner registration token not found")
}
- if runnerToken.IsActive {
- return nil, errors.New("runner token has already been activated")
+ if !runnerToken.IsActive {
+ return nil, errors.New("runner registration token has been invalidated, please use the latest one")
}
labels := req.Msg.Labels