be resilient to missing README files
On the ENEA mirror, specifically visiting https://mirror.softwareheritage.enea.it/browse/origin/directory/?origin_url=https://github.com/sschwartzman/newrelic_apache_httpd_plugin (which I obtained as 2nd result from the search "httpd apache") I get the following error:
Traceback (most recent call last):
File "/srv/softwareheritage/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/softwareheritage/venv/lib/python3.11/site-packages/swh/web/browse/views/origin.py", line 37, in origin_directory_browse
return browse_snapshot_directory(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/softwareheritage/venv/lib/python3.11/site-packages/swh/web/browse/snapshot_context.py", line 883, in browse_snapshot_directory
readmes[f["name"]] = f["checksums"]["sha1"]
~^^^^^^^^^^^^^
KeyError: 'checksums'
I think it means the README file is missing, probably due to mirroring delay (cc: @douardda).
From the POV of swh-web, we should be more resilient, because showing the default view without the rendered README is better than returning an error.