errors: handle no hash case

When we have no hash, we cannot show sources. But we should not end up
with an error. Fix this by proper handling that case.