Handle error in request