def ensure_data_exists(self, request, data, error_message=None):
if not data:<EOL><INDENT>error_message = (<EOL>error_message or "<STR_LIT>".format(request.get_full_path())<EOL>)<EOL>LOGGER.error(error_message)<EOL>raise NotFound(error_message)<EOL><DEDENT>
Ensure that the wrapped API client's response brings us valid data. If not, raise an error and log it.