Added error function on client for when things go horribly wrong