Add a span to register errors