feat: Added more debug logging

This commit is contained in:
2026-08-25 13:26:23 +00:00
parent e5947489e4
commit 3e4ccc9720
4 changed files with 42 additions and 10 deletions
@@ -405,6 +405,7 @@ func unavailableSnapshot(reason, title string) *StatusSnapshot {
// unpublished" would confirm it exists.
func PublicStatusSnapshot(instanceID, pageID string) (*StatusSnapshot, error) {
if err := ValidatePageID(pageID); err != nil {
log.Printf("public status: page id %q is not a valid id: %v", pageID, err)
return nil, ErrPageNotFound
}
if snap := cachedSnapshot(instanceID, pageID); snap != nil {
@@ -413,9 +414,11 @@ func PublicStatusSnapshot(instanceID, pageID string) (*StatusSnapshot, error) {
page, err := GetStatusPage(instanceID, pageID)
if err != nil {
log.Printf("public status: instance=%s page=%q lookup: %v", instanceID, pageID, err)
return nil, err
}
if !page.Published {
log.Printf("public status: instance=%s page=%q exists but published=false", instanceID, pageID)
return nil, ErrPageNotFound
}