Handle error responses