<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Logging on Buro notes</title><link>https://notes.burelli.xyz/tags/logging/</link><description>Recent content in Logging on Buro notes</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 23 Oct 2026 00:40:14 +0200</lastBuildDate><atom:link href="https://notes.burelli.xyz/tags/logging/index.xml" rel="self" type="application/rss+xml"/><item><title>Errors: model them once, catch them once</title><link>https://notes.burelli.xyz/posts/engineering/code-design-and-architecture/errors/</link><pubDate>Fri, 23 Oct 2026 00:01:28 +0200</pubDate><guid>https://notes.burelli.xyz/posts/engineering/code-design-and-architecture/errors/</guid><description>&lt;h1 id="errors-model-them-once-catch-them-once"&gt;Errors: model them once, catch them once&lt;/h1&gt;&#10;&lt;p&gt;Modeling errors in a useful, standard way is really important. An error has two goals:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Tell the user (or the client) what is wrong&lt;/strong&gt;, so they understand it and maybe can fix it themselves.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Make debugging easy&lt;/strong&gt; for you.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;This post shows how to design errors for both goals: a schema, one way to propagate them, a few rules on where to catch them, and one place to log and render them. The main examples come from an Elixir/Phoenix backend, with a short JavaScript version at the end.&lt;/p&gt;</description></item></channel></rss>