# Exception handling

A programming mechanism for disrupting normal control flow to handle errors or exceptional conditions, commonly using exception handlers and try/catch/finally constructs.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Stop Using Try-Catch Everywhere: Better Exception Handling in .NET

DevFeed: [Stop Using Try-Catch Everywhere: Better Exception Handling in .NET](<https://devfeed.tech/articles/stop-using-try-catch-everywhere-better-exception-handling-in-net-146531.md>)

Original publisher: [Read original article](<https://blog.devops.dev/stop-using-try-catch-everywhere-better-exception-handling-in-net-6c33917bce3a?source=rss----33f8b2d9a328---4>)

Author: Bharat Chandera

Published: 2026-11-20T12:30:30Z

Content type: article

Language: en

Sources: [DevOps.dev](<https://devfeed.tech/sources/devops-dev.md>)

Topics: [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [.NET](<https://devfeed.tech/topics/net.md>), [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>), [Null-Safety](<https://devfeed.tech/topics/null-safety.md>)

Tags: [asp-net](<https://devfeed.tech/tags/asp-net.md>), [asp-net-core](<https://devfeed.tech/tags/asp-net-core.md>), [aspnetcore](<https://devfeed.tech/tags/aspnetcore.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [csharp](<https://devfeed.tech/tags/csharp.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [net](<https://devfeed.tech/tags/net.md>)

### AI overview

Catching every exception and returning `BadRequest(ex.Message)` can make a .NET application harder to maintain, debug, and operate. The excerpt illustrates that APIs encounter distinct failures--database connection errors, missing records, payment timeouts, business-rule violations, and unexpected null references--but does not include the article's proposed handling approach.

### Source excerpt

Catching every exception doesn't make your application safer. Learn how to build clean, centralized, and reliable exception handling in... Continue reading on DevOps.dev "

## 7 Ways AI Agents Fail in Production (and How to Catch Each One)

DevFeed: [7 Ways AI Agents Fail in Production (and How to Catch Each One)](<https://devfeed.tech/articles/7-ways-ai-agents-fail-in-production-and-how-to-catch-each-one-146247.md>)

Original publisher: [Read original article](<https://machinelearningmastery.com/7-ways-ai-agents-fail-in-production-and-how-to-catch-each-one/>)

Author: Nahla Davies

Published: 2026-11-20T11:00:00Z

Content type: article

Language: en

Sources: [MachineLearningMastery.com](<https://devfeed.tech/sources/machinelearningmastery-com.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [ReAct agent Python](<https://devfeed.tech/topics/react-agent-python.md>), [OpenTelemetry](<https://devfeed.tech/topics/opentelemetry.md>), [Integration testing](<https://devfeed.tech/topics/integration-testing.md>), [Chaos Engineering](<https://devfeed.tech/topics/chaos-engineering.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [long-running](<https://devfeed.tech/topics/long-running.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>)

Tags: [agent-evaluation](<https://devfeed.tech/tags/agent-evaluation.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [fail](<https://devfeed.tech/tags/fail.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [production](<https://devfeed.tech/tags/production.md>)

### AI overview

A green tool response does not prove an agent completed its task; verify outcomes in resulting state and external records. The excerpt proposes seven regression checks: strictly validate tool arguments; compare extracted fields and source versions with confirmed ground truth; test whether injected document instructions are proposed and ensure they never execute; deny unauthorized cross-tenant or unapproved actions and assert stored data stays unchanged; retry with a stable operation ID and deduplicate matching requests; restart from persistent checkpoints and assert completion only when an authorized receipt exists; and stop repeated actions when progress stalls, using separate limits for calls, time, spend, and graph execution. Correlate run events under one ID, distinguish proposed, denied, waiting, and complete states, and pair each failing fixture with a passing control. The excerpt notes limits: confidence scores and citations do not establish correctness, in-memory checkpoints are lost on restart, and a timeout may leave an action's outcome unknown.

### Source excerpt

Three events that look alike need separate names.

## SSO sign-in consent screen: What it is and how to handle denials

DevFeed: [SSO sign-in consent screen: What it is and how to handle denials](<https://devfeed.tech/articles/sso-sign-in-consent-screen-what-it-is-and-how-to-handle-denials-127144.md>)

Original publisher: [Read original article](<https://workos.com/blog/sso-sign-in-consent-screen>)

Author: WorkOS

Published: 2026-11-10T16:15:34Z

Content type: article

Language: en

Sources: [WorkOS](<https://devfeed.tech/sources/workos-blog.md>)

Topics: [Single sign-on (SSO)](<https://devfeed.tech/topics/sso.md>), [identity and access management](<https://devfeed.tech/topics/identity-and-access-management.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [UI/UX Design](<https://devfeed.tech/topics/ui-ux-design.md>)

Tags: [branding](<https://devfeed.tech/tags/branding.md>), [callback](<https://devfeed.tech/tags/callback.md>), [consent](<https://devfeed.tech/tags/consent.md>), [sso](<https://devfeed.tech/tags/sso.md>)

### AI overview

WorkOS's SSO consent screen appears after identity-provider authentication and before the app receives an authorization code, showing the returned email and provider origin for user confirmation. Approval is remembered per user; the screen is enabled by default in new environments, while older ones should be checked in Authentication settings. Handle `signin_consent_denied` before expecting a code: direct the user to contact their admin and support about a possible phishing attempt, and keep this distinct from `access_denied`. For IdP-initiated logins, consent appears until approval; a configured sign-in endpoint can route the login into a standard SP-initiated flow and includes `connection_id`. Review the applicable environment branding, colors, and logos, since sandbox branding does not predict production. The screen adds a deliberate user check alongside other defenses, but cannot verify the displayed identity for the user.

### Source excerpt

The sign-in consent screen shows users their email and identity provider before SSO completes. When it appears, how to handle a denial, and what to brand.

## Agent Graph Engineering, Part 5: How to Build Safer AI Agents With Structured Errors and Guardrails

DevFeed: [Agent Graph Engineering, Part 5: How to Build Safer AI Agents With Structured Errors and Guardrails](<https://devfeed.tech/articles/agent-graph-engineering-part-5-how-to-build-safer-ai-agents-with-structured-errors-and-guardrails-116232.md>)

Original publisher: [Read original article](<https://hackernoon.com/agent-graph-engineering-part-5-how-to-build-safer-ai-agents-with-structured-errors-and-guardrails?source=rss>)

Author: Huy Nguyen

Published: 2026-11-04T08:50:15Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [Local AI](<https://devfeed.tech/topics/local-ai.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [human in the loop agent](<https://devfeed.tech/topics/human-in-the-loop-agent.md>)

Tags: [about](<https://devfeed.tech/tags/about.md>), [actions](<https://devfeed.tech/tags/actions.md>), [advanced](<https://devfeed.tech/tags/advanced.md>), [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agent-reliability](<https://devfeed.tech/tags/ai-agent-reliability.md>), [ai-output-screening](<https://devfeed.tech/tags/ai-output-screening.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [appearance](<https://devfeed.tech/tags/appearance.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [argument](<https://devfeed.tech/tags/argument.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [build](<https://devfeed.tech/tags/build.md>), [declarative-guardrails](<https://devfeed.tech/tags/declarative-guardrails.md>), [errors](<https://devfeed.tech/tags/errors.md>), [graph](<https://devfeed.tech/tags/graph.md>), [guardrails](<https://devfeed.tech/tags/guardrails.md>), [idea](<https://devfeed.tech/tags/idea.md>), [model](<https://devfeed.tech/tags/model.md>), [one](<https://devfeed.tech/tags/one.md>), [python](<https://devfeed.tech/tags/python.md>), [structured](<https://devfeed.tech/tags/structured.md>), [untrusted-input-fencing](<https://devfeed.tech/tags/untrusted-input-fencing.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

The excerpt's central design principle is to constrain agent behavior with explicit structure. Tools should raise typed errors that callers can handle by error type, separating technical details for the model from messages for people; unexpected bugs should propagate. Tool descriptions and planner hints guide selection, while docstrings guide argument filling, and `Literal` values constrain arguments to an enum. Irreversible actions use a persistent ledger keyed by run and tool for at-most-once execution, but a crash between claiming and recording leaves an uncertain outcome that requires human review. For customer text, fencing it as untrusted data is the primary prompt-injection defense; pattern detection records notices but can miss encoded or rephrased attempts. Output checks for credential-like strings and foreign ticket IDs block drafts before human approval. These checks do not replace approval, cover indirect injection from tool results or attachments, or provide PII redaction or tool sandboxing.

### Source excerpt

Two edges, one idea: constrain the model declaratively rather than by inspecting what it produced.

## CodeSOD: Death of the Auth-Er

DevFeed: [CodeSOD: Death of the Auth-Er](<https://devfeed.tech/articles/codesod-death-of-the-auth-er-115664.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/death-of-the-auth-er>)

Author: Remy Porter

Published: 2026-11-03T06:30:00Z

Content type: article

Language: en

Sources: [The Daily WTF](<https://devfeed.tech/sources/the-daily-wtf.md>)

Topics: [conditionals](<https://devfeed.tech/topics/conditionals.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [return](<https://devfeed.tech/topics/return.md>)

Tags: [auth](<https://devfeed.tech/tags/auth.md>), [code](<https://devfeed.tech/tags/code.md>), [codesod](<https://devfeed.tech/tags/codesod.md>), [conditionals](<https://devfeed.tech/tags/conditionals.md>), [death](<https://devfeed.tech/tags/death.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [perl](<https://devfeed.tech/tags/perl.md>), [production](<https://devfeed.tech/tags/production.md>)

### AI overview

The inherited `store()` handler is effectively disabled by unconditional `die` statements: it stops at `echo 'Hello'`, before attempting authentication. Further `die`s would also halt the success and failure paths, preventing the welcome response or redirect. The author speculates these statements were added while disabling the route path by path, but says the source history is unavailable; the code reportedly remained in production for years.

### Source excerpt

When writing Perl, it's not unusual to want to die. The die function ends your Perl program with an error string, and you'll often see code like: die "My error" unless $i > 5 or die "Other error" if check(), because Perl just loves the backwards conditionals. What's even more fun with die is how it behaves with eval blocks, so it doesn't always kill your program, sometimes it is how you pass error strings back out of sections of your program. And poor Bobby has inherited some Perl that just really loves to die. public function store() { echo 'Hello'; die; if (Auth::attempt(Input::only('email', 'password'))) { echo 'done'; die; // return "welcome ".Auth::user()->username } echo "Oops! Fails"; die; return Redirect::back()->with_input(); } Bobby didn't send the source control history here, but I have a sense of what it likely was like, once. If they authenticate successfully, print a welcome message. If they don't, redirect back to the logon page and let them try again. I suspect they wanted to disable the route. So first they disabled the success path, only to discover that the failure path kept redirecting, so they disabled that too. Finally, they added the Hello at the top to disable the whole thing. Why? Why did they do any of this? No idea. It feels like debugging code, but you'd expect more echos and fewer dies if that were the case. And you wouldn't expect it to leak into production and sit there for years, which is what happened here. [Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!

## Socket Programming in Python (Guide)

DevFeed: [Socket Programming in Python (Guide)](<https://devfeed.tech/articles/socket-programming-in-python-guide-110732.md>)

Original publisher: [Read original article](<https://realpython.com/python-sockets/>)

Author: Nathan Jennings

Published: 2026-10-31T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [async](<https://devfeed.tech/topics/async.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [blocking](<https://devfeed.tech/tags/blocking.md>), [client](<https://devfeed.tech/tags/client.md>), [guide](<https://devfeed.tech/tags/guide.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [python](<https://devfeed.tech/tags/python.md>), [server](<https://devfeed.tech/tags/server.md>), [socket](<https://devfeed.tech/tags/socket.md>)

### AI overview

The tutorial builds Python TCP client and server examples, starting with a blocking echo server using `socket()`, `bind()`, `listen()`, `accept()`, and `sendall()`. It explains that TCP provides reliable, in-order delivery, while `recv()` may return fewer bytes than requested, so applications must track partial reads and writes. For multiple connections, it uses nonblocking sockets and `selectors` to monitor readiness and maintain per-connection buffers; this event-loop approach is synchronous and its suitability depends on workload. A later design adds a `Message` class and an application protocol: a two-byte length prefix, followed by a UTF-8 JSON header with content metadata, then the payload. The excerpt also covers catching socket-related `OSError`s, connection timeouts, and closing idle connections, while noting that TCP itself does not define message boundaries. The source is an excerpt and ends during the protocol implementation discussion.

### Source excerpt

Build a Python socket server and client from scratch, then extend it to handle multiple connections at once without blocking.

## Kotlin Flow: Bugs That Look Correct at First

DevFeed: [Kotlin Flow: Bugs That Look Correct at First](<https://devfeed.tech/articles/kotlin-flow-bugs-that-look-correct-at-first-105704.md>)

Original publisher: [Read original article](<https://kt.academy/article/kaustubh_flow_bugs_that_look_correct_at_first>)

Published: 2026-10-26T00:00:00Z

Content type: article

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [bugfixes](<https://devfeed.tech/topics/bugfixes.md>), [coroutine-testing](<https://devfeed.tech/topics/coroutine-testing.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [cancellation](<https://devfeed.tech/tags/cancellation.md>), [capacity](<https://devfeed.tech/tags/capacity.md>), [collector](<https://devfeed.tech/tags/collector.md>), [collectors](<https://devfeed.tech/tags/collectors.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [database](<https://devfeed.tech/tags/database.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [execution](<https://devfeed.tech/tags/execution.md>), [flow](<https://devfeed.tech/tags/flow.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

The excerpt explains four Kotlin Flow pitfalls and how to address them. Collecting a cold flow separately for multiple consumers reruns its upstream work; use `shareIn()` when those consumers should share one collection, choosing a suitable scope and `SharingStarted` policy. `catch` handles failures upstream of its position, so move operations whose exceptions it should handle before `catch`; cancellation should generally propagate. `conflate()` may replace pending values with newer ones when a collector is slow, so use it only when intermediate values can be skipped; buffering can decouple producer and consumer, but a finite buffer may fill. Finally, `stateIn()` with `WhileSubscribed()` will not start upstream until there is a subscriber, so a test that only calls `runCurrent()` can still see the initial value. Use `Eagerly` for immediate collection or start a collector when testing subscription-driven behavior.

### Source excerpt

Four well-known Kotlin Flow bugs that look correct at first, why they happen, and how to fix them

## The catch That Didn't: Kotlin Flow's Channel Trap

DevFeed: [The catch That Didn't: Kotlin Flow's Channel Trap](<https://devfeed.tech/articles/the-catch-that-didn-t-kotlin-flow-s-channel-trap-99317.md>)

Original publisher: [Read original article](<https://proandroiddev.com/the-catch-that-didnt-kotlin-flow-s-channel-trap-da1bbdea80f5?source=rss----c72404660798---4>)

Author: Ehab Elwan

Published: 2026-10-25T16:37:00Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [cancellation](<https://devfeed.tech/tags/cancellation.md>), [channel](<https://devfeed.tech/tags/channel.md>), [collector](<https://devfeed.tech/tags/collector.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [crash](<https://devfeed.tech/tags/crash.md>), [error](<https://devfeed.tech/tags/error.md>), [fallback](<https://devfeed.tech/tags/fallback.md>), [flow](<https://devfeed.tech/tags/flow.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [network](<https://devfeed.tech/tags/network.md>), [operator](<https://devfeed.tech/tags/operator.md>), [queue](<https://devfeed.tech/tags/queue.md>), [screen](<https://devfeed.tech/tags/screen.md>), [skip](<https://devfeed.tech/tags/skip.md>), [source](<https://devfeed.tech/tags/source.md>), [state](<https://devfeed.tech/tags/state.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

A `catch` placed after a channel-creating Kotlin Flow operator such as `flowOn` may miss an upstream error when downstream work is suspended: the source failure cancels collection, and `catch` can interpret that cancellation as a separate downstream failure. A queued value can also be lost when the source fails before it is collected. The excerpt reports reproductions on the JVM and Android with kotlinx.coroutines 1.11.0. Its main recommendation is to handle errors before the first channel-creating operator, in the layer that owns the source, and convert expected failures to values. Wrapping only a failing call in `try`/`catch` inside the flow builder is another option; omit `flowOn` when the builder is already main-safe. If the source cannot be changed, moving suspending work into `onEach` before `catch`, or using `conflate()` or `collectLatest` when skipped values or work are acceptable, can help with specific collector patterns. These workarounds do not restore queued values already lost; `collectLatest` also has a cancellation limitation. A `CoroutineExceptionHandler` may keep the app alive but does not ensure the `catch` block handles the error.

### Source excerpt

Why a catch after flowOn can skip your fallback or crash the app, and where to put it instead.TL;DR What breaks: a catch after flowOn, or after any other operator that creates a channel, can let the source's exception skip it, which crashes the app on Android, or drop a value still in the queue before the screen gets it. Reproduced on kotlinx.coroutines 1.11.0, on the JVM and on an Android device, with the pattern the official Android guide teaches. Who is affected: a collector that suspends per value (a network call or a snackbar per update), or an early stop such as first(). A collector that only writes UI state, like stateIn's, is safe from the crash. The fix: handle errors before the first operator that creates a channel, in the layer that owns the source. Move catch before flowOn (and before stateIn or shareIn) and turn the error into a value there, or wrap the one call that can fail in try/catch inside the flow builder. If every call is already main-safe, drop flowOn. Can't move it? If your collector suspends per value, move its work into onEach before catch, or use conflate() after catch or collectLatest { } when only the latest value matters. As a last resort, wrap the terminal call in try/catch, and ask the flow's owner to move catch. None of these saves a value already in the queue. Don't rely on a CoroutineExceptionHandler: the app survives, but your catch block almost never runs. How to spot it: the crash points at your own code above a catch that should have handled it, and its trace carries a Suppressed: cancellation. The rest of the article shows the crash, why it happens, and the ways out, with the runs behind each claim. Disclosure: drafted by me and refined with AI tools, which also helped create the tests.A crash your catch was written to prevent Take a chat app that shows a notification for each new message. The observer in this example has the same shape as Wire's: it posts the notifications, then marks the messages as notified, in a scope for t

## JEP targeted to JDK 28: 543: Structured Concurrency

DevFeed: [JEP targeted to JDK 28: 543: Structured Concurrency](<https://devfeed.tech/articles/jep-targeted-to-jdk-28-543-structured-concurrency-92514.md>)

Original publisher: [Read original article](<https://inside.java/2026/10/21/jep543-target-jdk28/>)

Author: Viktor Klang

Published: 2026-10-21T00:00:00Z

Content type: release

Language: en

Sources: [Inside Java](<https://devfeed.tech/sources/inside-java.md>)

Topics: [Structured concurrency](<https://devfeed.tech/topics/structured-concurrency.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [openjdk](<https://devfeed.tech/topics/openjdk.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [async](<https://devfeed.tech/topics/async.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [jep](<https://devfeed.tech/tags/jep.md>), [project-loom](<https://devfeed.tech/tags/project-loom.md>), [structured-concurrency](<https://devfeed.tech/tags/structured-concurrency.md>)

### AI overview

JEP 543 proposes finalizing Structured Concurrency in JDK 28 without further API changes. `StructuredTaskScope` groups related subtasks in a lexical scope: the owner forks them, joins them as a unit, and closes the scope, which cancels remaining subtasks and waits for them to terminate. The default policy fails when a subtask fails and cancels unfinished siblings; interruption of the owner also propagates cancellation. `Joiner` options support other completion policies, including returning the first successful result or collecting all successful results. Thread dumps can show scopes and their subtasks as a hierarchy. Cancellation depends on subtasks responding to interruption; uninterruptible work can delay scope closure indefinitely. The API is intended to complement, not replace, `ExecutorService` and `Future`, and is described as a preview through JDK 27.

### Source excerpt

The following JEP is targeted to JDK 28: 543: Structured Concurrency

## Part 2: Kotlin Flows -- Mastering Operators (Valves, Filters, and T-Joints)

DevFeed: [Part 2: Kotlin Flows -- Mastering Operators (Valves, Filters, and T-Joints)](<https://devfeed.tech/articles/part-2-kotlin-flows-mastering-operators-valves-filters-and-t-joints-91136.md>)

Original publisher: [Read original article](<https://proandroiddev.com/part-2-kotlin-flows-mastering-operators-valves-filters-and-t-joints-f9d7a8ebd64c?source=rss----c72404660798---4>)

Author: Sandeep Kella

Published: 2026-10-20T16:42:42Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [collect](<https://devfeed.tech/tags/collect.md>), [data](<https://devfeed.tech/tags/data.md>), [exception](<https://devfeed.tech/tags/exception.md>), [fallback](<https://devfeed.tech/tags/fallback.md>), [filter](<https://devfeed.tech/tags/filter.md>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [map](<https://devfeed.tech/tags/map.md>), [network](<https://devfeed.tech/tags/network.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

Kotlin Flow operators transform, filter, and handle errors as items travel through a flow: `filter` keeps matching values, `map` converts each value, and `catch` can emit a fallback for upstream exceptions. Operators return wrapped flows; intermediate operators do not start execution, while terminal operators such as `collect` do. The article recommends keeping filtering and formatting outside UI collection code. It contrasts Flow's sequential per-item processing with List operators that create a new list in memory. Its interview examples note that `catch` does not handle errors thrown downstream in `collect`, and compare search strategies: `flatMapConcat` runs sequentially, `flatMapMerge` concurrently with potentially out-of-order results, and `flatMapLatest` cancels outdated work.

### Source excerpt

Hey again! In Part 1, we built our Air Compressor (the Flow) and pulled the trigger on our Spray Gun (the .collect() function) to start the air moving. But let's be real--if you just blast raw air straight out of a compressor, you're going to get moisture, dirt, and uneven pressure. To do a professional paint job, you need attachments on your hose. In Kotlin Flows, these attachments are called Operators. They intercept the data while it's traveling down the pipe, changing it before it ever reaches the UI (the spray gun). The Breakdown: Valves and Filters Let's look at the three most common attachments you'll put on your hose: 1. The Moisture Trap (filter) Sometimes the compressor spits out water droplets along with the air. You don't want water ruining your paint job. The filter operator acts like a screen--it only lets things pass if they meet a certain condition. // Only emit air bursts that are perfectly dry airFlow.filter { air -> air.isDry == true } 2. The Paint Mixer (map) Right now, you just have raw air. But you want blue paint. The map operator intercepts the raw air, mixes blue paint into it, and sends it further down the line. It literally transforms the data type from A to B. // Transforms RawAir into BluePaint airFlow.map { rawAir -> Paint(color = "Blue", pressure = rawAir.pressure) } 3. The Safety Release Valve (catch) What happens if the compressor explodes or a pipe bursts? In code, this is an Exception (like a network crash). If you don't have a safety valve, the explosion travels all the way to the spray gun and breaks it (your app crashes). The catch operator safely handles the explosion. airFlow .catch { exception -> println("Whoops! Pipe burst: $exception") emit(BackupAir()) // We can even emit a fallback value! } Diagrammatic Mental Model: [Compressor] ---> ( filter: keep dry ) ---> ( map: add paint ) ---> ( catch: safety ) ---> [Spray Gun] raw air dry air blue paint safe paint UI updatesUnder the Hood: What happens internally? Operators in Flow

## Next.js ISR Transient Errors: Prevent notFound from Caching 404s

DevFeed: [Next.js ISR Transient Errors: Prevent notFound from Caching 404s](<https://devfeed.tech/articles/next-js-isr-transient-errors-prevent-notfound-from-caching-404s-90896.md>)

Original publisher: [Read original article](<https://www.sitepoint.com/nextjs-isr-transient-error-notfound/>)

Author: SitePoint Team

Published: 2026-10-20T15:42:57Z

Content type: article

Language: en

Sources: [SitePoint](<https://devfeed.tech/sources/sitepoint.md>)

Topics: [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [cache-invalidation](<https://devfeed.tech/topics/cache-invalidation.md>), [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>), [Resilience](<https://devfeed.tech/topics/resilience.md>), [error tracking](<https://devfeed.tech/topics/error-tracking.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [errors](<https://devfeed.tech/tags/errors.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [next](<https://devfeed.tech/tags/next.md>), [next-js](<https://devfeed.tech/tags/next-js.md>), [outages](<https://devfeed.tech/tags/outages.md>), [programming](<https://devfeed.tech/tags/programming.md>), [recover](<https://devfeed.tech/tags/recover.md>), [separate](<https://devfeed.tech/tags/separate.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

During Next.js ISR background revalidation, `notFound()` can replace a valid cached page with a 404 if a data helper turns outages into `null`. The article's fix is to return `null` only when the CMS explicitly responds 404 and throw on network failures, timeouts, other unsuccessful statuses, or unexpected content types; the failed revalidation then preserves an existing stale page. It recommends `{ cache: 'no-store' }` when live fetches are needed, and notes that this protection cannot provide stale content if no valid page has been cached yet. For recovery from already cached 404s, it shows an authenticated `revalidatePath()` route and advises batching large purges to limit render and infrastructure costs. Test the behavior with `next build` and `next start`, since ISR is inactive in `next dev`; confirm it on the target Next.js version.

### Source excerpt

Prevent transient outages from caching valid Next.js ISR pages as 404s. Separate infrastructure errors from missing records and recover fast. Continue reading Next.js ISR Transient Errors: Prevent notFound from Caching 404s on SitePoint.

## How to stop 429 rate limit errors in a Webflow Cloud app so CMS pages stay up under traffic

DevFeed: [How to stop 429 rate limit errors in a Webflow Cloud app so CMS pages stay up under traffic](<https://devfeed.tech/articles/how-to-stop-429-rate-limit-errors-in-a-webflow-cloud-app-so-cms-pages-stay-up-under-traffic-109582.md>)

Original publisher: [Read original article](<https://www.webflow.com/blog/fix-webflow-api-429-rate-limit-errors>)

Author: Ismail Ajagbe

Published: 2026-10-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Webflow Blog](<https://devfeed.tech/sources/webflow-blog.md>)

Topics: [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>), [webflow](<https://devfeed.tech/topics/webflow.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [gotchas](<https://devfeed.tech/topics/gotchas.md>), [observability](<https://devfeed.tech/topics/observability.md>), [debug tools](<https://devfeed.tech/topics/debug-tools.md>), [hosting](<https://devfeed.tech/topics/hosting.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-key](<https://devfeed.tech/tags/api-key.md>), [app](<https://devfeed.tech/tags/app.md>), [batch](<https://devfeed.tech/tags/batch.md>), [budget](<https://devfeed.tech/tags/budget.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [cms](<https://devfeed.tech/tags/cms.md>), [content](<https://devfeed.tech/tags/content.md>), [delivery](<https://devfeed.tech/tags/delivery.md>), [errors](<https://devfeed.tech/tags/errors.md>), [guides](<https://devfeed.tech/tags/guides.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [limit](<https://devfeed.tech/tags/limit.md>), [pages](<https://devfeed.tech/tags/pages.md>), [reading](<https://devfeed.tech/tags/reading.md>), [stop](<https://devfeed.tech/tags/stop.md>), [traffic](<https://devfeed.tech/tags/traffic.md>), [under](<https://devfeed.tech/tags/under.md>), [up](<https://devfeed.tech/tags/up.md>), [webflow](<https://devfeed.tech/tags/webflow.md>)

### AI overview

The guide reduces Webflow Data API 429s by routing published CMS reads through the cached, read-only Content Delivery API, adding a short in-memory TTL cache with a stale-value fallback, and batching writes in groups of up to 100. It says limits are per API key (60 requests/minute on Starter and Basic, 120 on specified older plans), so an app-only token helps prevent other scripts from consuming its budget. A shared wrapper surfaces rate-limit headers and Retry-After; sync requests stop on 429 and report progress because the roughly 60-second wait exceeds Webflow Cloud's 20-second request timeout. Tradeoffs include per-instance, nonpersistent memory caches; published-only delivery reads; and delayed updates from the app and CDN caches. The excerpt also flags deployment constraints: client fetches need the configured base path, and the Next.js edge runtime directive is unsupported by the Cloudflare adapter.

### Source excerpt

Learn how to fix 429 rate limit errors from a Webflow Cloud app by reading through the Content Delivery API.

## The Ghost Work Left Behind by Cancelled Coroutines

DevFeed: [The Ghost Work Left Behind by Cancelled Coroutines](<https://devfeed.tech/articles/the-ghost-work-left-behind-by-cancelled-coroutines-89749.md>)

Original publisher: [Read original article](<https://proandroiddev.com/the-ghost-work-left-behind-by-cancelled-coroutines-a892bd467a6b?source=rss----c72404660798---4>)

Author: Rohan Maity | RotBolt

Published: 2026-10-18T19:56:04Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [cancellation](<https://devfeed.tech/topics/cancellation.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Structured concurrency](<https://devfeed.tech/topics/structured-concurrency.md>), [suspend function](<https://devfeed.tech/topics/suspend-function.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bluetooth](<https://devfeed.tech/tags/bluetooth.md>), [bridges](<https://devfeed.tech/tags/bridges.md>), [cancellations](<https://devfeed.tech/tags/cancellations.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [coroutinescope](<https://devfeed.tech/tags/coroutinescope.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>)

### AI overview

Kotlin coroutine cancellation is cooperative, so failures occur when code catches CancellationException as an ordinary error, callback bridges fail to cancel underlying requests, blocking calls ignore cancellation, or work runs in scopes without a clear owner. The excerpt links these gaps to misleading error logs and empty results, hanging or stale workflows, wasted IO capacity, Bluetooth work surviving disconnects, and saves lost during logout. It recommends rethrowing cancellation, using cancellable bridges that cancel their requests, preferring suspend APIs (or runInterruptible for interruptible JVM calls), assigning scopes to lifecycle owners, and sequencing critical saves and logout in one coroutine. It also distinguishes timeout-as-error from expected timeout, and notes that a Mutex serializes sends without guaranteeing callback arrival order. The review questions suggest where runtime tracing may help; static review cannot prove that a pattern caused an incident.

### Source excerpt

Lessons from a production Android codebase Cancellation in Kotlin Coroutines looks simple: cancel the Job, and the coroutine stops. In production, it is rarely that clean. Cancellation is cooperative. Every suspend function, exception handler, callback bridge and child scope must carry the signal. Break one boundary, and work may continue after its owner is gone. We saw the result in production: false error logs, empty results, stale Bluetooth work and a final save lost during logout. Nothing crashed. The app simply continued with the wrong state. Cancellation is cooperative Kotlin uses CancellationException to stop a coroutine. Functions such as delay and await check the Job and throw when it is cancelled. val job = scope.launch { delay(5_000) updateState() } job.cancel() Here, delay observes cancellation, so updateState is not called. Regular Kotlin code does not check automatically. It keeps running until the next cancellation point. When cancellation becomes a failure return try { repository.fetchNotifications() } catch (error: Exception) { logger.error("Failed to load notifications", error) emptyList() } If the user leaves the screen, viewModelScope is cancelled and fetchNotifications throws CancellationException. The broad catch records a normal lifecycle event as a failure. It also returns emptyList, so the caller cannot distinguish cancellation from a successful query with no data. runCatching has the same problem because it also catches CancellationException. Rethrow cancellation before handling other failures. catch (error: CancellationException) { throw error } catch (error: Exception) { logger.error("Failed to load notifications", error) emptyList() } In production, normal navigation becomes error telemetry. Empty values can appear as missing documents, notifications or time cards. Support sees missing data while the app reports a completed request. Callback bridges can outlive the caller suspend fun loadMessages() = suspendCoroutine { continuation -> ch

## Python Exceptions: An Introduction

DevFeed: [Python Exceptions: An Introduction](<https://devfeed.tech/articles/python-exceptions-an-introduction-88449.md>)

Original publisher: [Read original article](<https://realpython.com/python-exceptions/>)

Author: Said van de Klundert

Published: 2026-10-16T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Python](<https://devfeed.tech/topics/python.md>), [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>)

Tags: [custom-exceptions](<https://devfeed.tech/tags/custom-exceptions.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

This tutorial introduces Python exceptions and explains how to raise, catch, and handle them with try, except, else, and finally. It also covers creating custom exception types and cautions against broad exception handling and relying on assertions for critical production checks.

### Source excerpt

Learn what Python exceptions are, how to raise them, how to handle them with try, except, else, and finally, and how to create custom ones.

## Try Real Java in Your Browser, Compiler Errors Included

DevFeed: [Try Real Java in Your Browser, Compiler Errors Included](<https://devfeed.tech/articles/try-real-java-in-your-browser-compiler-errors-included-85599.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/playground-real-java-compiler/>)

Author: Shai Almog

Published: 2026-10-13T00:00:00Z

Content type: article

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [debug tools](<https://devfeed.tech/topics/debug-tools.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [browser-game](<https://devfeed.tech/topics/browser-game.md>), [Chromium](<https://devfeed.tech/topics/chromium.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [diagnostics](<https://devfeed.tech/tags/diagnostics.md>), [java](<https://devfeed.tech/tags/java.md>)

### AI overview

The Codename One Playground compiles Java into class files in the browser, then translates them into JavaScript for the preview. The article explains how its compiler handles Java constructs such as records and lambdas, reports diagnostic and runtime limitations, and describes the conformance and browser tests used to check the pipeline.

### Source excerpt

The Playground compiles Java to bytecode and translates it inside the browser. Try records and lambdas, inspect diagnostics and understand the supported runtime API.

## ★ Exceptions that explain themselves

DevFeed: [★ Exceptions that explain themselves](<https://devfeed.tech/articles/exceptions-that-explain-themselves-65720.md>)

Original publisher: [Read original article](<https://freek.dev/3091-exceptions-that-explain-themselves>)

Author: Freek Van der Herten (freek@spatie.be)

Published: 2026-10-06T10:30:47Z

Content type: tutorial

Language: en

Sources: [Freek](<https://devfeed.tech/sources/freek-dev-all-blogposts.md>)

Topics: [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Eloquent ORM](<https://devfeed.tech/topics/eloquent.md>)

Tags: [custom](<https://devfeed.tech/tags/custom.md>), [custom-exceptions](<https://devfeed.tech/tags/custom-exceptions.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [explain](<https://devfeed.tech/tags/explain.md>), [laravel](<https://devfeed.tech/tags/laravel.md>)

### AI overview

The article recommends using a dedicated custom exception class for each domain error, with a static factory method for each failure reason. It demonstrates how this approach makes throw sites clearer, preserves typed context in error messages, and keeps expected domain errors out of Laravel error reporting.

### Source excerpt

There There, the helpdesk we're building at Spatie, is a project of learned habits. Twenty-some years of writing Laravel apps has taught us which patterns pay off and which ones quietly rot. One that keeps earning its keep is a custom exception class for every domain error. This is a small pattern, but it's one of those things that makes a codebase nicer to live in. There There is in private beta right now, and you can apply for early access at there-there.app. Exceptions that explain themselves The conventional answer for a domain error is something like throw new InvalidArgumentException("Only notes can be deleted"). It works, the test passes, the user sees a 500 page. But then three months later you try to catch just this specific error and you can't, because InvalidArgumentException is thrown from a dozen other places. Our pattern is one class per domain error, with a static factory method per reason. Here's the one that fires when someone tries to delete a message that isn't a note. namespace App\Domain\Tickets\Exceptions; use App\Domain\Tickets\Models\Message; use Exception; use Illuminate\Contracts\Debug\ShouldntReport; class CouldNotDeleteMessage extends Exception implements ShouldntReport { public static function onlyNotesCanBeDeleted(Message $message): self { return new self("Could not delete message id {$message->id} of type {$message->type->value}. Only messages of type `note` can be deleted."); } } Two things worth calling out. The static method name spells out the failure reason in English, which makes the throw site read like a sentence: throw CouldNotDeleteMessage::onlyNotesCanBeDeleted($message). And the method takes the typed context as a parameter, which makes the message impossible to build without the relevant data. Here's the throw site, inside our DeleteNoteAction. class DeleteNoteAction { public function execute(Message $message): void { if (! $message->isNote()) { throw CouldNotDeleteMessage::onlyNotesCanBeDeleted($message); } // ... delete

## John Park's CircuitPython Parsec: Surviving Sensor Drop with Try/Except

DevFeed: [John Park's CircuitPython Parsec: Surviving Sensor Drop with Try/Except](<https://devfeed.tech/articles/john-park-s-circuitpython-parsec-surviving-sensor-drop-with-try-except-64013.md>)

Original publisher: [Read original article](<https://blog.adafruit.com/2026/10/02/john-parks-circuitpython-parsec-surviving-sensor-drop-with-try-except/>)

Author: John Park

Published: 2026-10-02T16:00:49Z

Content type: tutorial

Language: en

Sources: [Adafruit Industries](<https://devfeed.tech/sources/adafruit-industries-makers-hackers-artists-designers-and-engineers.md>)

Topics: [CircuitPython](<https://devfeed.tech/topics/circuitpython.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>)

Tags: [circuitpython](<https://devfeed.tech/tags/circuitpython.md>), [except](<https://devfeed.tech/tags/except.md>), [i2c](<https://devfeed.tech/tags/i2c.md>)

### AI overview

A CircuitPython example shows how try/except handling can help code continue gracefully when an I2C sensor disconnects.

### Source excerpt

#circuitpythonparsec Help your code gracefully survive an I2C sensor disconnect with a try/except in CircuitPython. Try out the code example To learn about CircuitPython: https://circuitpython.org

## Standardizing Exception Message Style in Ruby

DevFeed: [Standardizing Exception Message Style in Ruby](<https://devfeed.tech/articles/standardizing-exception-message-style-in-ruby-20535.md>)

Original publisher: [Read original article](<https://code.dblock.org/2026/09/05/standardizing-exception-message-style-in-ruby.html>)

Author: Daniel Doubrovkine (dblock@dblock.org)

Published: 2026-09-05T00:00:00Z

Content type: article

Language: en

Sources: [Daniel Doubrovkine](<https://devfeed.tech/sources/daniel-doubrovkine.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Continuous integration](<https://devfeed.tech/topics/continuous-integration.md>), [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>)

Tags: [exception](<https://devfeed.tech/tags/exception.md>), [grape](<https://devfeed.tech/tags/grape.md>), [lint](<https://devfeed.tech/tags/lint.md>), [messages](<https://devfeed.tech/tags/messages.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [style](<https://devfeed.tech/tags/style.md>)

### AI overview

Grape standardized bare exception messages to lowercase, without a final period, matching how Ruby exception messages follow the class name and a colon; seven inconsistent call sites were fixed and the convention documented. The rubocop-exception_messages plugin provides autocorrecting cops for capitalization and trailing periods, except literal ellipses. It recognizes two raise forms and checks only the first or last literal segment of interpolated messages, since interpolated values are outside the cops' control. The summary also says the plugin allows configuring the opposite convention and includes checks for redundant exception class names and consistent marking of interpolated values. Version 0.2.0 was added to Grape's CI setup.

### Source excerpt

While reviewing dozens of PRs from ericproulx optimizing Grape's internals recently, I noticed that the bare raise ArgumentError, "..." calls scattered across the codebase were inconsistent: some messages were capitalized, some ended in a period, most were not. Longtime readers know where this is going. Ruby's own core and standard library exceptions don't do this - TypeError: no implicit conversion from nil to integer, ArgumentError: wrong number of arguments, and so on all read lowercase and unpunctuated, because the message is meant to be read after the exception class name and a colon, not as a standalone sentence. Grape's own Grape::Exceptions::* classes already follow this convention. The bare raise ArgumentError, "..." calls in dsl/entity.rb, dsl/inside_route.rb, dsl/validations.rb, and validations/types/dry_type_coercer.rb didn't, so I fixed those seven sites and documented the convention in CONTRIBUTING.md, in #2909. To avoid regressions, I wrote rubocop-exception_messages, a RuboCop plugin gem with two cops: ExceptionMessages/Casing flags (and autocorrects) messages that don't start with a lowercase letter. ExceptionMessages/Punctuation flags (and autocorrects) messages with a trailing period, with an exception for a literal ellipsis ("still processing.."), which is stylistic rather than a sentence ending. Both cops recognize raise Class, "message" and raise Class.new("message") forms, and handle interpolated (dstr) messages by only checking the literal string segments (the first segment for casing, the last for punctuation), since interpolated values in the middle are out of the cop's control. # bad raise ArgumentError, 'Missing required option.' # good raise ArgumentError, 'missing required option' The gem ships as a modern RuboCop plugin (via lint_roller), so it's a one-line addition to a consuming project's .rubocop.yml: plugins: - rubocop-exception_messages rubocop-exception_messages 0.2.0 is out now, and I've added it back to Grape's own Gemfile and

## Next.js error handling: a practical guide

DevFeed: [Next.js error handling: a practical guide](<https://devfeed.tech/articles/next-js-error-handling-a-practical-guide-20052.md>)

Original publisher: [Read original article](<https://www.honeybadger.io/blog/next-js-error-handling/>)

Author: Farhan Hasin Chowdhury

Published: 2026-06-18T07:00:00Z

Content type: tutorial

Language: en

Sources: [Honeybadger](<https://devfeed.tech/sources/honeybadger.md>)

Topics: [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Crashlytics](<https://devfeed.tech/topics/crashlytics.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [components](<https://devfeed.tech/tags/components.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [fallback](<https://devfeed.tech/tags/fallback.md>), [form](<https://devfeed.tech/tags/form.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [javascript-articles](<https://devfeed.tech/tags/javascript-articles.md>), [next-js](<https://devfeed.tech/tags/next-js.md>), [nextjs](<https://devfeed.tech/tags/nextjs.md>)

### AI overview

The excerpt recommends modeling expected failures in Next.js App Router as return values so the UI can explain the problem and let users respond. For Server Actions, return validation or API errors for the client to display through React's form state hook; in Server Components, check fetch responses and render fallback UI when a request fails. For a 404, call Next.js's dedicated function to stop rendering the current page and show a 404 UI, with a custom page available in the route segment. The excerpt ends mid-example and does not provide details on uncaught-error boundaries or Honeybadger setup.

### Source excerpt

Next.js gives developers a structured way to handle errors at every level of an application -- from form validation to root-level crashes. Learn how to manage expected errors with return values, catch uncaught exceptions with error boundaries, and set up automatic error reporting in production.

## How to Accept Payments in a FastAPI Backend

DevFeed: [How to Accept Payments in a FastAPI Backend](<https://devfeed.tech/articles/how-to-accept-payments-in-a-fastapi-backend-9532.md>)

Original publisher: [Read original article](<https://dodopayments.com/blogs/accept-payments-fastapi/>)

Author: Ayush Agarwal

Published: 2026-03-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dodo Payments Blog](<https://devfeed.tech/sources/dodo-payments-blog.md>)

Topics: [FastAPI](<https://devfeed.tech/topics/fastapi.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Integration testing](<https://devfeed.tech/topics/integration-testing.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [backend](<https://devfeed.tech/tags/backend.md>), [developer-tools](<https://devfeed.tech/tags/developer-tools.md>), [dodo](<https://devfeed.tech/tags/dodo.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [payments](<https://devfeed.tech/tags/payments.md>), [pydantic](<https://devfeed.tech/tags/pydantic.md>), [pydantic-validation](<https://devfeed.tech/tags/pydantic-validation.md>), [validation](<https://devfeed.tech/tags/validation.md>), [verification](<https://devfeed.tech/tags/verification.md>), [webhook](<https://devfeed.tech/tags/webhook.md>)

### AI overview

The article's core guidance is to treat verified webhooks as the source of truth for payment state: create checkout sessions through the async Dodo Payments client, then verify each webhook's signature with `client.webhooks.unwrap` before processing events or updating the database. It shows Pydantic models for validating checkout fields, including email and quantity constraints, and routing events such as `payment.succeeded`, `subscription.active`, and `payment.failed`. It also covers test-mode webhook delivery with ngrok, idempotency, HTTPS, and secret storage. Dodo Payments is described as a Merchant of Record that handles global tax and compliance; the article does not compare payment providers.

### Source excerpt

Learn how to integrate Dodo Payments into your FastAPI backend with async webhook handlers, Pydantic validation, and secure signature verification.

## Scalable API Response Handling Across Multi-Layered Architectures with Sandwich

DevFeed: [Scalable API Response Handling Across Multi-Layered Architectures with Sandwich](<https://devfeed.tech/articles/scalable-api-response-handling-across-multi-layered-architectures-with-sandwich-25924.md>)

Original publisher: [Read original article](<https://proandroiddev.com/scalable-api-response-handling-across-multi-layered-architectures-with-sandwich-39ab02ae8c90?source=rss-9bb203a4ab2e------2>)

Author: Jaewoong Eum

Published: 2026-02-08T06:25:14Z

Content type: article

Language: en

Sources: [Jaewoong Eum](<https://devfeed.tech/sources/stories-by-jaewoong-eum-on-medium.md>)

Topics: [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [API](<https://devfeed.tech/topics/api.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [MVVM](<https://devfeed.tech/topics/mvvm.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>)

Tags: [advanced](<https://devfeed.tech/tags/advanced.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [applications](<https://devfeed.tech/tags/applications.md>), [approach](<https://devfeed.tech/tags/approach.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [article](<https://devfeed.tech/tags/article.md>), [basic](<https://devfeed.tech/tags/basic.md>), [blocks](<https://devfeed.tech/tags/blocks.md>), [body](<https://devfeed.tech/tags/body.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [but](<https://devfeed.tech/tags/but.md>), [cases](<https://devfeed.tech/tags/cases.md>), [challenge](<https://devfeed.tech/tags/challenge.md>), [code](<https://devfeed.tech/tags/code.md>), [handling](<https://devfeed.tech/tags/handling.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [networking](<https://devfeed.tech/tags/networking.md>), [retrofit](<https://devfeed.tech/tags/retrofit.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

Sandwich preserves API outcome context across Android architecture layers by wrapping calls in a sealed `ApiResponse` with distinct success, HTTP error, and client exception cases. This avoids the ambiguity and repeated `try-catch` blocks that arise when data sources return fallback values such as empty lists. Retrofit integrates through `ApiResponseCallAdapterFactory`; Ktor uses `apiResponseOf`, and Ktorfit uses `ApiResponseConverterFactory`, yielding the same response type. The text describes handlers and transformations for mapping, sequential dependent requests, recovery, validation, filtering, and combining responses. `zip` returns the first failure if either response fails, while paginated `merge` can either fail on any page or retain successful pages and ignore failures. Flow and suspend variants support asynchronous work in handlers. The overview is based on the supplied article text.

### Source excerpt

Unsplash@picoftasty Modern Android applications commonly adopt multi-layered architectures such as MVVM or MVI, where data flows through distinct layers: a data source, a repository, and a ViewModel (or presentation layer). Each layer has a specific responsibility, and network responses must propagate through all of them before reaching the UI. While this separation produces clean, testable code, it introduces a real challenge: how do you handle API responses, including errors and exceptions, as they cross each layer boundary? Most developers solve this by wrapping API calls in try-catch blocks and returning fallback values. This works for small projects, but as the number of API calls grows, the approach creates ambiguous results, scattered boilerplate, and lost context that downstream layers need. You end up with ViewModels that cannot tell whether an empty list means "no data" or "network failure," repositories that swallow important error details, and data sources that repeat the same error handling pattern dozens of times. In this article, you'll explore the problems that emerge when handling Retrofit API calls across layered architectures, why conventional approaches break down at scale, and how Sandwich provides a type safe, composable solution that simplifies response handling from the network layer all the way to the UI. You'll also walk through the full set of Sandwich APIs, from basic response handling to advanced patterns like sequential composition, response merging, global error mapping, and Flow integration, each with real world use cases that show when and why you would reach for them. Retrofit API calls with coroutines Most Android projects use Retrofit with Kotlin coroutines for network communication. A typical service interface looks like this: https://medium.com/media/ebcba33386d664d1cf69a89234d2e22a/href The service returns a List<Poster> directly. Retrofit deserializes the JSON response body and gives you the data. This works perfectly when the

## Kotlin Coroutines Cancellation and Exception Handling

DevFeed: [Kotlin Coroutines Cancellation and Exception Handling](<https://devfeed.tech/articles/kotlin-coroutines-cancellation-and-exception-handling-38659.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2026_01_11_kotlin_coroutines_cancellation_and_exception_handling/>)

Published: 2026-01-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [cancellation](<https://devfeed.tech/topics/cancellation.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [cancellation](<https://devfeed.tech/tags/cancellation.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>)

### AI overview

This article explains why cancellation and exception handling in Kotlin coroutines are difficult, emphasizing that the concepts are distinct but coupled. It discusses the flexibility and hidden complexity of the coroutine API and introduces explanations and best practices for learning and using these mechanisms.

### Source excerpt

Cancellation and exception handling in coroutines is by far the most complex thing I've faced during my entire career. These two things are so complicated that I sometimes ask myself how people are using such a difficult-to-use framework. I read all the possible docs that I found, many different articles, video courses, and even tried to look at the code - and still, I feel that my understanding of this topic is quite bad. When reading articles, I often thought that their structure was not good and that things were not clarified in a reasonable way. Usually, articles are just a collection of examples that show how certain combinations of suspending functions or coroutine builders will work. Learning by examples is good, but they should help with understanding core concepts so that all other situations are easy to relate to what was learned.

## GSoC 2025: ClangIR upstreaming

DevFeed: [GSoC 2025: ClangIR upstreaming](<https://devfeed.tech/articles/gsoc-2025-clangir-upstreaming-43126.md>)

Original publisher: [Read original article](<https://blog.llvm.org/posts/2025-gsoc-clangir-upstreaming/>)

Author: Amr Hesham (amrdeveloper)

Published: 2025-12-01T00:00:00Z

Content type: article

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [mlir](<https://devfeed.tech/topics/mlir.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [clangir](<https://devfeed.tech/tags/clangir.md>), [code](<https://devfeed.tech/tags/code.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [gsoc](<https://devfeed.tech/tags/gsoc.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mlir](<https://devfeed.tech/tags/mlir.md>)

### AI overview

A Google Summer of Code 2025 project report describes upstreaming ClangIR, a high-level C/C++ representation implemented with MLIR between Clang's AST and LLVM IR. The work covered design improvements, built-in vector operations, complex-number operations, and C++ exception handling.

### Source excerpt

Hello everyone 👋! My name is Amr Hesham, and for Google Summer of Code 2025, I've been working on the ClangIR Upstreaming project. My mentors were Bruno Cardoso Lopes, Andy Kaylor and Erich Keane. Background ClangIR is a high-level representation in Clang that reflects aspects of the C/C++ languages and their extensions. It is implemented using MLIR and occupies a position between Clang's AST and LLVM IR. Starting from April 2024, the upstreaming process started to migrate the code from the incubator to the main LLVM repository. The ClangIR upstreaming process includes the following steps: Improve the design of ClangIR dialect operations, attributes, syntax and implementation details if needed. Align with LLVM coding standards and quality expectations. Implement missing features in the incubator and upstream it. Backport the new design/implementation from the LLVM repository to the incubator. Implement folders for ClangIR dialect operations. The goal of this project was to implement the following C/C++ features in the ClangIR project. Built-in VectorType (vector_size and ext_vector_type attributes) with operators and built-ins functions. ComplexType with operators and all -complex-range flag values to allow selecting different arithmatic calculation algorithms, for example, the SMITH, R. L. Algorithm 116: Complex division. Commun. ACM 5, 8 (1962). C++ Exception handling. What we did Over the coding period, I did the following. Builtin VectorType I have implemented support for all C/C++ operators for built-in VectorType that includes arithmetic, comparison, shifts and logical operators, also supporting using VectorType in many expressions, for example, index and ternary expression, and now we can compile C++ code successfully. Also, implemented folders for ClangIR VectorType operations to fold specific patterns. For example, in cir::VecExtractOp, if both the vector and the index are constant, we can fold that operation and replace it with the actual result. // Before

## Nim version 2.2.6 released

DevFeed: [Nim version 2.2.6 released](<https://devfeed.tech/articles/nim-version-2-2-6-released-53633.md>)

Original publisher: [Read original article](<https://nim-lang.org//blog/2025/10/31/nim-226.html>)

Published: 2025-10-31T00:00:00Z

Content type: release

Language: en

Sources: [Nim Programming Language](<https://devfeed.tech/sources/nim-programming-language.md>)

Topics: [Nim](<https://devfeed.tech/topics/nim.md>), [version](<https://devfeed.tech/topics/version.md>), [bugfixes](<https://devfeed.tech/topics/bugfixes.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [copy](<https://devfeed.tech/topics/copy.md>), [return](<https://devfeed.tech/topics/return.md>), [Package Management](<https://devfeed.tech/topics/package-management.md>)

Tags: [2-2](<https://devfeed.tech/tags/2-2.md>), [announce](<https://devfeed.tech/tags/announce.md>), [async](<https://devfeed.tech/tags/async.md>), [bugfixes](<https://devfeed.tech/tags/bugfixes.md>), [builds](<https://devfeed.tech/tags/builds.md>), [closure](<https://devfeed.tech/tags/closure.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [copy](<https://devfeed.tech/tags/copy.md>), [download](<https://devfeed.tech/tags/download.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [install](<https://devfeed.tech/tags/install.md>), [nim](<https://devfeed.tech/tags/nim.md>), [release](<https://devfeed.tech/tags/release.md>), [return](<https://devfeed.tech/tags/return.md>), [version](<https://devfeed.tech/tags/version.md>)

### AI overview

The Nim team announces Nim 2.2.6, a patch release for the stable Nim 2.2 series containing 141 commits of bug fixes and improvements. The release updates exception handling and closure iterator transformation, enables a compiler move optimization for return field expressions, and includes installation guidance and numerous fixes.

### Source excerpt

The Nim Team is happy to announce version 2.2.6, the third patch release for our stable release, Nim 2.2. It comes six months after the 2.2.4 release and it contains 141 commits, bringing bugfixes and improvements. If you're still on Nim 1.6, take a look at the version 2.0 release article to see all the features you're missing. If you've been using Nim 2.0, the version 2.2 release article shows the improvements available in Nim 2.2. The Nim 2.2.6 changelog is available here. Highlights Exception handling combined with Nim's async is more stable than ever before as the underlying closure iterator transformation has been rewritten. The compiler is now smart enough to produce a move operation for return obj.field. Previously it performed a copy. Expect your code to run slightly faster due to this and other minor performance improvements. Installing Nim 2.2.6 Check out if the package manager of your OS already ships version 2.2.6 or install it as described here. If you have installed a previous version of Nim using choosenim, getting Nim 2.2.6 is as easy as: $ choosenim update self $ choosenim update stable NOTE: We recommend you to install and use the latest version of choosenim, v.0.8.16, available in our choosenim repo. Alternatively, you can download Nim 2.2.6 from our nightlies builds. Bugfixes Fixed "=destroy for non-var failed to compile when JS" (#24914) Fixed "{.push raises: [].} doesn't respect lexical scoping" (#23355) Fixed "Pragma block disabling warning has effect beyond block" (#21975) Fixed "missing < (less than), cmp for cstring" (#24941) Fixed "[GC] Illegal storage access when collecting cycle" (#4851) Fixed "Globals in proc with static params end up being re-initialized" (#24940) Fixed "Constructor to global variable in converter generates illegal c code" (#4594) Fixed "Compile-time regression from v2.2.4 to version-2-2/devel with global variable with unhandled exception: iterators.nim(254, 11) len(a) == L the length of the seq changed while iterating

[Next page](<https://devfeed.tech/topics/exception-handling.md?cursor=WyIyMDI1LTEwLTMxVDAwOjAwOjAwKzAwOjAwIiwgImUxNzY2OTIyLWVjYmMtNDE0ZC05MmRkLTQ1MjIyMmNjNGZiMiJd>)