added missing handleerror function