📢 Blogged: "What's in a Good Error Message?" Discussing some recommendations for designing error messages in libraries and frameworks. morling.dev/blog/whats-in-…
@gunnarmorling You should write a book man. You must, you have to 😊
@gunnarmorling Guys from @Docker needs to read the blog post I wasted 1 day trying to figure why I received that error github.com/blobtoolkit/bl…
@gunnarmorling Nice recap, albeit: «Either raise an exception OR log an error, but not both» Yeah: Don't extend, log & trow, etc. Also don't split like in current cloud dev tools: Without context switch when an API error response requires transitioning into full logs inspection. ¯\_(ツ)_/¯
@gunnarmorling Speaking of context (MDC or NDC): When throwing an exc, I sometimes prefix its message with NDC.get() + ": actual message" to capture the origin’s context which is lost when the exc is being logged or output only further down the stack. This can also save adding detail manually.
@gunnarmorling Great blog! I shared it with my team. I created a blog also that touched upon some of these things from a point of view of build to manage and exception handling. I need to beef up the section on error messages based on best practices you mention. medium.com/ibm-garage/bui…
@gunnarmorling spot on. I usually scratch my head till lost hairs trying to figure out what the error messages mean.