Add client side error handling