YmerNode.Mcp.Tools.ScriptAuthor.Errors (Ymer Node v0.2.1)

Copy Markdown View Source

Translates the script_author tool's error reasons into messages a worker can act on. Called by YmerNode.Mcp.Tools.ScriptAuthor's Wymcp.Tool.handle_error/1.

Two sources, and the split is worth knowing when you add a clause. The compiler refuses code before a row exists — every reason YmerNode.Scripts.Compiler can answer arrives here, and the detail it carries is already the diagnostic, so most clauses add the next call and nothing else. Acceptance refuses what the compiler cannot see, because it depends on the other rows.

Deliberately not shared with YmerNode.Mcp.Tools.Scripts.Errors: nothing here can reach that tool, which compiles nothing and accepts nothing, and nothing there but :not_found can reach this one.

Summary

Functions

format(reason, ctx \\ %{})

message(changeset, arg2)