check entity search request success (#17) and remove all trailing whitespace