Additional error handling function on the UI side