I am using the following to search a directory recursively for specific string and replace it with another:
grep -rl oldstr path | xargs sed -i \'s/oldstr/ne
I think that without using -exec you can simply provide /dev/null as at least one argument in case nothing is found:
-exec
/dev/null
grep -rl oldstr path | xargs sed -i 's/oldstr/newstr/g' /dev/null