-added error hadler to root request