handle non-200 status codes