Skip to content

Commit 2f15f02

Browse files
authored
Merge develop into master (#9)
2 parents 9a7b42d + bfd53f3 commit 2f15f02

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/container/container.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,16 @@ func (d *DataContainer) InitWakaStats(ctx context.Context) error {
262262
return err
263263
}
264264

265+
// if the status is not "ok", print the message
265266
if v.Data.Status != "ok" {
266-
d.Logger.Println("WakaTime data is not available")
267-
return nil
267+
switch v.Data.Status {
268+
case "pending_update":
269+
d.Logger.Println("WakaTime is not ready yet")
270+
default:
271+
d.Logger.Println("An error occurred while fetching WakaTime data:", v.Data.Status)
272+
273+
return nil // Skip if the status is unknown
274+
}
268275
}
269276

270277
d.Data.WakaTime = v

0 commit comments

Comments
 (0)