Error service and directive