add better handling for non-200 http status codes