Regarding the error, see this forum question and answer below it.
I want to stop workflow waiting of activity result after throwing newNonRetryableFailure.
Can you show your code? Seems you are invoking the activity async and not waiting on it to complete before completing workflow execution.
You could also set failures for which not to retry your activity via ActivityOptions->RetryOptions->setDoNotRetry