Udi Dahan wrote a very helpful and enjoyable paper in which he Clarified CQRS (command-query responsibility segregation). While explaining the benefits of CQRS he planted a somewhat disturbing thought in my mind:
We may be resorting too readily to reporting errors to our users.
In other words, we may be telling our users “There’s something wrong here. You deal with it!” too quickly, too often and too readily. In many cases, appropriate alternatives are fairly obvious and probably quite implementable.
(As a side note, many of these alleged error conditions can be traced back to the failure to plan for the concurrency of events and actions in real life (i.e. we’re not talking thread management here) as Udi pointed out. That’s something to think about in another post…)
Is calling a situation an error and reporting it to the user the easy way out? As developers, are we yielding our responsibility to achieve meaningful outcomes when processing user requests to readily? What do we fear in this context?
I resolve to question decisions to treat a situation as an error and report it to a user more thoroughly in the future. That may well take some courage.