We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad2d5cf commit 3321ddaCopy full SHA for 3321dda
cmd/bot/main.go
@@ -126,21 +126,21 @@ func main() {
126
return fmt.Errorf("failed to start service: %v", err)
127
}
128
129
+ var runErr error
130
+
131
for {
132
slog.DebugContext(ctx, "checking...")
133
if err := content.Do(ctx, c); err != nil {
134
if !errors.Is(err, content.ErrCouldNotContent) {
- slog.ErrorContext(ctx, err.Error())
- os.Exit(1)
135
+ runErr = err
136
+ break
137
138
slog.DebugContext(ctx, "backing off...")
- break
-
139
140
141
time.Sleep(checkInterval)
142
143
- return nil
+ return runErr
144
},
145
146
0 commit comments