Hi Viswas,
Thank you for posting your question. As you may know, using a pre-refresh hook will run a script of your choice before the refresh action. If your script runs into a failure, the script will stop running. However, the refresh action will continue as planned regardless of the failure.
Unfortunately, there is not a way to control the refresh action based upon the return value of the hook. You can find more information on how to utilize hook operations at our help article
"Oracle Hook Operation Notes".
I hope this helps. Please let me know if you have any questions.
Thanks!
Srish