front-end error handling