Log and return PersistSession error in check command
A failed file write was silently ignored, causing attendance updates to be lost with no indication of failure to cron or the log. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c39bd3ec53
commit
3aa0c71c32
1 changed files with 4 additions and 1 deletions
|
|
@ -121,7 +121,10 @@ will attend the next session.`,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data.PersistSession(session)
|
if err := data.PersistSession(session); err != nil {
|
||||||
|
log.Default().Printf("ERROR persisting session: %s", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue