Handle error responses in a sane way.