phanjomJS identifying html requests erros and passing them to python