# What's in a Good Error Message?

DevFeed: [What's in a Good Error Message?](<https://devfeed.tech/articles/what-s-in-a-good-error-message-18889.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/whats-in-a-good-error-message/>)

Published: 2022-01-12T18:20:00Z

Content type: opinion

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Exception](<https://devfeed.tech/topics/exception.md>), [Development](<https://devfeed.tech/topics/development.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [application-development](<https://devfeed.tech/tags/application-development.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [code](<https://devfeed.tech/tags/code.md>), [developers](<https://devfeed.tech/tags/developers.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exception](<https://devfeed.tech/tags/exception.md>), [framework](<https://devfeed.tech/tags/framework.md>), [library](<https://devfeed.tech/tags/library.md>)

## AI overview

The article explains that useful error messages from libraries and frameworks should provide context about what the code was doing, identify exactly what failed, and describe how to mitigate the problem. It focuses on messages for developers and operations staff, distinguishing them from user-facing error messages.

## Source excerpt

Table of Contents Context The Error Itself Mitigation General Best Practices As software developers, we've all come across those annoying, not-so-useful error messages when using some library or framework: "Couldn't parse config file", "Lacking permission for this operation", etc. Ok, ok, so something went wrong apparently; but what exactly? What config file? Which permissions? And what should you do about it? Error messages lacking this kind of information quickly create a feeling of frustration and helplessness. So what makes a good error message then? To me, it boils down to three pieces of information which should be conveyed by an error message: Context: What led to the error? What was the code trying to do when it failed? The error itself: What exactly failed? Mitigation: What needs to be done in order to overcome the error?