Error while running garbage-collect on registry

I am running the command:

docker exec -it registry garbage-collect /etc/docker/registry/config.yml --dry-run
The execution ends with the following error:

csso-users: marking blob sha256:c2274a1a0e2786ee9101b08f76111f9ab8019e368dce1e325d3c284a0ca33397
csso-users: marking blob sha256:6a266be29177576519c9eb05c1c85b3bb98df56559c00806b23ff0ff469403b6
failed to garbage collect: error enumerating blobs: filesystem: unsupported digest algorithm

I tried searching for a solution to this issue but couldn’t find a clear answer. I would appreciate any guidance on what to investigate.

I fixed this issue; I found an extra directory in ‘/…/registry/data/docker/registry/v2/blobs/’ that was somehow interfering with the execution. After removing this directory and keeping only the ‘sha-256’, everything worked as expected.