changing null response to RestResponse failure