client-side error handling