added error typing example