Page MenuHomeSoftware Heritage

Create an elegant error when content found in DB but not in objstorage
Closed, MigratedEdits Locked

Description

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/

Event Timeline

moranegg triaged this task as Normal priority.Jul 5 2018, 11:32 AM

I can improve a little bit the error message but the redirection to a 404 error page is the right thing to do here (browse or api). The HTTP error code is meaningful, especially for those querying the archive programmatically or with curl for instance.

I will take the improvement of the error message :-)

But it feels like we have more information about the file with the API than what we provide with the Web-app and I thought the same data should be accessible on both.

Ok, I got your point. Then, the best option here is to display the 404 error into the content box while keeping the metadata available to display.

FWIW, the 404 issue was fixed by rSPSITEdbfc5c7e20f49ca6be23a84673b5c661dece6dd2: that specific content was stored in an objstorage that moma wasn't configured to look in.