utils: cleanup in RestCall and RestException