Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-httpclient

Named HTTP clients for Pudu: a client factory, delegating handlers, pooled keep-alive connections, handler lifetimes, logging, and resilience

0.1.1Apache-2.01

InstallClose

ADR-0001-outcomes-not-exceptions.md

Markdown32 lines948 B

GitHub ↗

ADR-0001 — Every handler answers an outcome


type: adr status: Accepted tags: [adr]


Context

Handlers retry, log, and translate what the layers inside them answered. Pudu has no exceptions to catch, and a panic ends the program.

Decision

Every handler, primary handler, and client helper answers Outcome[T], a Result[T, Failure] ([[src/PuduLangHttpClient]]). A response with any status is an Ok; Response.ensureSuccess turns a status outside 2xx into Unsuccessful when the caller asks.

Consequences

  • A resilience handler sees a 503 as a response and decides by predicate whether to retry it.
  • Every refusal the package makes is a value with its cause.

Rejected

  • Treating non-success statuses as failures everywhere: handlers could no longer see the response.

Referenced by

[[CHANGELOG]] · [[architecture/_MOC]] · [[decisions/_MOC]] · [[domain/Outcome]] · [[handoffs/2026-10-06-initial-package]]