feat: Added more debug logging
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user