---
title: "Throw, Result, or neither?"
url: https://daily.dev/posts/throw-result-or-neither--q6gk0bmvv
source_url: https://www.architecture-weekly.com/p/throw-result-or-neither
type: article
source: "Architecture Weekly"
published: 2026-07-20T17:51:45.820Z
updated: 2026-07-20T17:52:11.913Z
tags: ["architecture", "typescript", "domain-driven-design"]
reading_time: 24
upvotes: 23
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Throw, Result, or neither?

**[Architecture Weekly](https://daily.dev/sources/architectureweekly)** · 24 min read · 23 upvotes · 0 comments

## Summary

A deep dive into error handling strategies in event-sourced systems, arguing that returning business failures as domain events is often preferable to throwing exceptions or using Result types. Using a shopping cart example in TypeScript with the Emmett framework, the author demonstrates how events like ProductItemOutOfStock and ShoppingCartItemLimitReached can carry richer business data than exceptions or Result wrappers. The post covers selective persistence (deciding whether to append an event to the stream), batch command handling with atomic vs. non-atomic semantics, and Emmett's middleware helpers (rejectOn, skipOn, stopOn, stopAfter, throwOn) that let the same decision function behave differently across use cases like HTTP endpoints, cart imports, and saved-list restores. Exceptions are still used for invalid operations and infrastructure failures, while Result types are critiqued for adding propagation overhead without replacing the persistence and continuation decisions that event types already encode.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.architecture-weekly.com/p/throw-result-or-neither>

## Similar posts on daily.dev

- [Throw, Result, or neither?](https://daily.dev/posts/throw-result-or-neither--btptsrpke) · Event-Driven by Oskar Dudycz · 1 upvotes · 1 comments
- [Consumers, projectors, reactors and all that messaging jazz in Emmett](https://daily.dev/posts/consumers-projectors-reactors-and-all-that-messaging-jazz-in-emmett-ie8ierv12) · Architecture Weekly · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#typescript](https://daily.dev/tags/typescript), [#domain-driven-design](https://daily.dev/tags/domain-driven-design)

[View this post on daily.dev](https://daily.dev/posts/throw-result-or-neither--q6gk0bmvv)
