Page MenuHomeSoftware Heritage

Create error badge for repositories that are not found in SWH
Closed, ResolvedPublic


From the README side,
@scatenag noticed that if the repository has not been acquired by software heritage we get a broken image.

He is suggesting something like


Event Timeline

moranegg triaged this task as Normal priority.Dec 12 2019, 8:53 PM
moranegg created this task.

I am confused because this is already implemented. I just tested again and I got exactly the badge posted above when the origin is not found in the archive.

I need more details on this.

Well .. It is a strange behavior .. possibly related to GitHub ..

Have a look at

The first badge is


If you follow the link you get the right (origin not found) badge,
but GitHub renders it as broken image link.

On the contrary, when the origin is found, GitHub renders the badge correctly: see for instance

I think I understand what's wrong here. Github will not render a badge if the associated HTTP request to get the image data does not return a 200 status code.
As the badge endpoint returns a 404 error code when an origin is not archived, the error badge is not displayed.
I will fix that behavior and deploy a new version of swh-web during the afternoon.

@scatenag , issue fixed and deployed. Thanks for reporting it !