Have a content page loaded with metadata and if the raw content isn't available, have a message in the content box:
"The content is not available at the moment, please come again later"
See the examples :
https://archive.softwareheritage.org/browse/revision/56125ddc55b80d77c1ca3c9b3d6bbd1fc9587708/?path=latex.php
vs
https://archive.softwareheritage.org/api/1/content/sha1_git:9d86333671193f5a1877336aec8c4e0bfda5aeaf/