Using what you have there, sending (string update) between the host and client, you can't throw and catch the error. From my experience, you'd either need to:
a) add another function, as you suggest "add a new OnError function ... ", containing an error flag and string for the message, or
b) change the String in OnUpdate function to an object containing your return string, but also a bError flag, a string for an error message or perhaps an Exception object.
Then, as the client is looping and listening for an inbound message, check the new function or object for your error conditions.
That's what I'm doing ...