catch HTTP-errors