Handle http resonse errors