handling errors in Happy