ELSEIF
Your brief EB
378 stories from 115 feeds 426 clusters Refreshed 2 minutes ago next pull 20:07

LANGUAGES Signal 458

Signatures, be true: domain errors and functional handling in Kotlin

The proposal is to return Either<DocumentSignError, Unit> from Kotlin functions so that expected failures are visible in the signature.

WHY IT MATTERS

Making domain errors explicit in the function signature aligns with Salmon’s engineering culture of real ownership and high standards, preventing hidden failures from reaching production. It allows callers to handle every expected outcome without digging into implementation details.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The function signature should return Either<DocumentSignError, Unit> to make domain errors visible.

02

Domain errors are failures where the client behaved correctly but the operation cannot succeed, such as an invalid signing code, a closed window, or an already-signed document.

03

Other failure categories, client errors and unexpected exceptions, are handled via HTTP responses or operational signals, not placed in the domain model.

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
Kotlin Signatures, be true: domain errors and functional handling in Kotlin Open ↗