{"id":"recipe--failures","name":"Explain a failure kindly","owner":"yeho","package":"recipes","kind":"recipe","signature":"start.yh","description":"Separate a machine-readable error from a helpful message.","context":"A program can be correct and still meet a failure: a folder might be read-only or an input file might be missing. Good error handling tells the person what happened and what they can do next. Yeho's experimental error value has a type and message. The type is a stable identity for code to inspect; the message explains the problem to a person. Creating this value alone does not throw it or perform a save.","parameters":[],"returns":"","members":[],"tags":["cpu","recipe"],"updated":"2026-09-09","source":{"repository":"demonhunterlabs","path":"app/lib/yeho-walkthrough.ts"},"status":"complete-program","notes":["Write a message for a missing image. Include what could not load and one useful recovery action."],"examples":[{"id":"program","title":"Explain a failure kindly","description":"Separate a machine-readable error from a helpful message.","code":"error problem = Error(\"save.denied\", \"Choose a folder you can write to.\")\nConsole.Log(problem.type + \": \" + problem.message)","manifest":"manifestVersion = \"2\"\npackage = \"api.example.recipe__failures\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","tags":["cpu"],"run":"cpu-oracle","expected":"save.denied: Choose a folder you can write to.","verification":"type checked","sha256":"4ee1be5e3b492d45fbbf0a031fa51c8fe1283199e20f9a7f429535d4ac0c476e","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=recipe--failures","json":"https://demonhunterlabs.com/reference/items/recipe--failures.json","markdown":"https://demonhunterlabs.com/reference/text/recipe--failures.md"}
