Long Error Messages
It is incredibly helpful to quickly detect when a customer encounters an error and where the error originated from in your source code. They did not know that the service name for the circuit breaker was specific to the hostname we were calling and that the circuit breaker tripped for external service A did not mean that it also tripped for service B. This is the price of error messages that are not informative enough. Id.). But if we look at other examples from Rails, we can see some more useful error messages there. We are not limited to specifying the error messages with single-line strings, we can also use heredocs - a multiline string preformatted with line breaks. Since we can include arbitrary programmatic strings in our error messages, nothing prevents us from having relevant user input in the error message. Since we know this error only emerges in the face of that input, we inject it into the error message. Long error messages are a great way to achieve that and provide you with considerable benefits at a small up-front cost.