handle server 4xx, 5xx responses