Skip to content

Commit

Permalink
fix pointer dereferebce when no time stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Nov 14, 2024
1 parent 3570aeb commit 5c5b56d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/pkg/website/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ func GetLastUpdateTimestamp(network *config.NetworkInfos, websiteAddress string)
return nil, fmt.Errorf("fetching website last update timestamp: %w", err)
}

//TODO: If this is the case we should garcefully handle it either displaying 404 or specific page/warning message
if lastUpdateTimestampResponse.FinalValue == nil {
return nil, nil
return nil, fmt.Errorf("Last updated timestamp not found")
}

timestampStr := string(lastUpdateTimestampResponse.FinalValue)
Expand Down

0 comments on commit 5c5b56d

Please sign in to comment.