↑↓ to navigate Enter to open "…" all these words ANDOR to combine

Architecture Decision Record

ADR-013: Result Pattern over Exceptions for Flow Control

Status

Accepted. Revised 2026-07-21 (exception-handler chain / ProblemDetails edge contract documented). Revised 2026-08-26 (ErrorType.Unexpected, severity-ranked status selection for aggregated failures, and the full combinator surface). Revised 2026-08-27 (v1.164.0): the UI layer deviation is retired. MMCA.Common.UI services return Result end to end instead of throwing, the severity ranking is hoisted into MMCA.Common.Shared so the HTTP and gRPC edges classify one aggregate identically, and the round trip back into Result is a shipped reader rather than a per-service convention. Revised 2026-08-31: the catch-all exception handler now maps CrossTenantWriteException to HTTP 400 ahead of its 500 fallback, so a write refused at the tenant boundary reads as a caller fault. Revised 2026-09-03: the error Code is gated as a per-repo public vocabulary (one literal code, one owning type) by an IL-reading architecture rule. Revised 2026-10-01: citations re-anchored after line shifts; no decision changed. Revised 2026-10-06: ErrorType.TooManyRequests (HTTP 429, gRPC ResourceExhausted, severity rank 45) joins the category set, the catch-all exception handler also answers BadHttpRequestException with the status it carries (413 for an oversize body), and the UI executor counts Polly's ExecutionRejectedException as a transport fault. Revised 2026-10-07: a client-synthesized failure is localized by its code through the caller's localizer and, when the caller passes one, then the framework's own SharedResource pair before falling back to English, and the error-catalog rule's own summary now states that it does not read Error.TooManyRequests; anchors refreshed after the v1.232.1 release. Revised 2026-10-21: the error-catalog rule now recognizes Error.TooManyRequests (v1.247.0), so codes built through it are held to the uniqueness and prefix gates; the 499 handler also answers a DbException raised after the client disconnects (v1.241.0); anchors refreshed. Revised 2026-10-26: TryGetValue is an instance member of Result<T> (v1.252.0) and the page-side extension keeps only the overload that hands the errors back, which decides on a non-null success value; the 409 handler's concurrency metric is recorded; anchors refreshed. Revised 2026-10-28: the code-based localization lookup is scoped to the three code kinds it covers (Http.EmptyResponse and Http.MalformedResponse render in English), the reader's own handling of an unreadable body ahead of the executor is recorded, and the Result channel is no longer said to carry requestId. Revised 2026-11-23: an Error carries an optional RetryAfter and HandleFailure answers a 429 with a Retry-After header from the longest hint (v1.295.0), a value that is not projected into the errors array; anchors refreshed. Revised 2026-11-24: the error-catalog IL scan reads method bodies through the testing package's own metadata reader rather than Mono.Cecil (MMCA.Common 1.318.0, ADR-015 Amendment (2026-11-24)); the Decision's wording is corrected in place. Revised 2026-11-30 (v1.323.0): ErrorType.Failure is removed and ErrorType.Unavailable (HTTP 503) names a dependency that failed or did not answer in time, the member values are pinned, the unused railway helpers are removed, Result cannot be constructed outside its assembly, and the never-thrown domain exceptions and their handler are deleted; the Decision is corrected in place (see Revision below). Revised 2026-12-05 (v1.335.0): the error catalog reads every module layer except UI (Domain, Application, Shared, API and Infrastructure), and Helpdesk runs it; corrected in place in the catalog section.

Context

Operations at every layer fail in expected ways: input is invalid, a domain invariant is broken, a requested entity is missing, a uniqueness conflict occurs, the caller lacks permission. There are two common ways to signal those: throw an exception and translate it near the edge, or return an explicit value that the caller must inspect. Using exceptions for expected business outcomes has real costs: the failure is invisible in the method signature, it is easy to forget to catch, it is comparatively expensive on the throw path, and it conflates "the user asked for something we will not do" with "the process is broken."

Decision

Model expected failures as values using Result / Result<T> (MMCA.Common.Shared.Abstractions), not exceptions.

  • A Result is either success or failure; a failure carries one or more Error records (Code, Message, Type of type ErrorType, optional Source / Target, and an init-only TimeSpan? RetryAfter a TooManyRequests or Unavailable producer sets when it knows how long the refusal lasts, MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/Error.cs:31-38; the sign-in lockout sets it, MMCA.Common/Source/Core/MMCA.Common.Infrastructure/Auth/LoginProtectionService.cs:107).

  • ErrorType is a transport-agnostic category: Validation, Invariant, NotFound, Conflict, Unauthorized, Forbidden, UnprocessableEntity, Unexpected, TooManyRequests, Unavailable. The domain never names an HTTP status, and there is no unclassified member: every error names a meaning, Validation, Invariant or UnprocessableEntity when the caller can fix the request, Unavailable when retrying later can succeed, and Unexpected when neither holds (MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/ErrorType.cs:13-16). Unexpected is the genuine server-side fault (the request was well formed and permitted, the server could not complete it, and retrying will not cure it, ErrorType.cs:47-53): it maps to HTTP 500 (MMCA.Common/Source/Presentation/MMCA.Common.API/Middleware/ErrorHttpMapping.cs:32) and to gRPC Internal (MMCA.Common/Source/Presentation/MMCA.Common.Grpc/ResultGrpcExtensions.cs:48), and it is explicitly not for business-rule violations (ErrorType.cs:49-51, factory at .../Shared/Abstractions/Error.cs:140-141, whose summary sends a failed or timed-out dependency to Unavailable, :131-133). TooManyRequests is the temporary refusal (a login or password-change lockout): it maps to HTTP 429 (ErrorHttpMapping.cs:33) and gRPC ResourceExhausted (ResultGrpcExtensions.cs:49), and the caller fixes it by retrying later rather than by changing the request (ErrorType.cs:55-59, factory at Error.cs:112-113). Unavailable is a dependency that failed or did not answer in time (a storage or push provider, a remote service, an expired request budget): the request was fine and retrying later can succeed, so it maps to HTTP 503 (ErrorHttpMapping.cs:34) and gRPC Unavailable (ResultGrpcExtensions.cs:50) (ErrorType.cs:61-67, factory at Error.cs:125-126). The numeric values are pinned explicitly (Unexpected = 8, TooManyRequests = 9, Unavailable = 10, ErrorType.cs:53, :59, :67) and 7 is retired (:16-18), so no in-process or persisted value moves; both wire forms carry the member name (ErrorHttpMapping.cs:70, ResultGrpcExtensions.cs:138).

  • Domain factory methods and mutators return Result<T>; application command/query handlers thread results through the combinators or an early return instead of try/catch. The surface is:

    • Lifting without naming a factory. An Error converts implicitly to a failed Result (.../Shared/Abstractions/Result.cs:50) or Result<T> (:242-246), and a value converts implicitly to a successful Result<T> (:258), so a guard clause writes return someError; and a happy path writes return theValue;. Result.FromError is the named alternate for the non-generic conversion (:56-60); the inherited Result.Failure<T> / Result.Success<T> factories are the named alternates on the generic type (:108, :75).
    • On Result<T>: Match (:269-277), exactly one branch running; Map (:285-289), Bind (:311-315) and BindAsync (:298-302). TryGetValue unwraps the value inside a conditional the way Dictionary.TryGetValue does, deciding on IsFailure rather than on the value so a value-type default is not mistaken for success (:206-216, the check at :208); a multi-step handler unwraps each step this way and returns early on failure.
    • On the non-generic Result: Match (:162-168) and Bind (:176-180), so a valueless step composes the same way instead of forcing an IsFailure check, and Combine aggregates several results into one (:131-152).
    • There are no combinators over a pending Task<Result<T>> and no side-effect or predicate combinators: an asynchronous step is awaited, then unwrapped or bound.
    • Every combinator short-circuits: a failed result never invokes the delegate it was handed (Result.cs:179, :288, :301, :314).
  • The transport mapping lives only at the edge. ApiControllerBase.HandleFailure() (MMCA.Common/Source/Presentation/MMCA.Common.API/Controllers/ApiControllerBase.cs:50-78) maps an ErrorType to an HTTP status through a FrozenDictionary (ErrorHttpMapping.cs:23-35, resolved at ApiControllerBase.cs:63) and returns an RFC 9457 ProblemDetails body carrying all errors (:65-73, projection at ErrorHttpMapping.cs:65-74). A 429 whose TooManyRequests errors, or a 503 whose Unavailable errors, carry a RetryAfter also gets a Retry-After header, the longest hint winning, in the whole rounded-up seconds the rate limiters send (ApiControllerBase.cs:75, SetRetryAfter at :89-112, the hinted type chosen by status at :92-103, the header written at :110 only for a positive hint, :108); any other status, or a 429 or 503 with no positive hint, sends none. RetryAfter is not projected into the errors array (ErrorHttpMapping.cs:65-74), so it travels only as that header and does not round-trip through ProblemDetailsResultReader. gRPC does the equivalent over the wire (GrpcResultExceptionInterceptor, ADR-007) from a mirrored table (Validation/Invariant to InvalidArgument, NotFound to NotFound, Conflict to Aborted, Unauthorized to Unauthenticated, Forbidden to PermissionDenied, UnprocessableEntity to FailedPrecondition, Unexpected to Internal, TooManyRequests to ResourceExhausted, Unavailable to Unavailable: ResultGrpcExtensions.cs:41-50), so callers keep programming against Result<T> across a process boundary.

  • A failure carrying several errors takes the status of the most severe one, never of the first, and both edges rank it the same way. Result.Combine aggregates errors in evaluation order (Result.cs:131-152), so a positional rule let an incidental validation failure downgrade a real 403 or 500 to a 400. The ranking is one table in the Shared layer, ErrorTypeSeverity (MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/ErrorTypeSeverity.cs:32), most to least severe: Unexpected (70) > Unavailable (65) > Unauthorized (60) > Forbidden (50) > TooManyRequests (45) > Conflict (40) > NotFound (30) > UnprocessableEntity (20) > Invariant / Validation (one shared rank of 10, :39-51), with the reasoning for each rank written onto the type itself (:16-27; a lockout outranks a conflict because the caller is refused whatever the request says, :22). MostSevere keeps the earliest error on a tie (:72-99, strict > at :91) and an unmapped category ranks lowest, so a category added to ErrorType without a rank can never silently outrank a real 403 or 500 (:60, stated at :53-57). The scan is index-based rather than a LINQ MaxBy because it runs on every failure response (:86-87).

    It lives in Shared rather than in one presentation package because two edges consume it. HTTP resolves the status from ErrorTypeSeverity.MostSevere (.../MMCA.Common.API/Middleware/ErrorHttpMapping.cs:54-55, called from ApiControllerBase.HandleFailure at ApiControllerBase.cs:63) and gRPC's ToRpcException does the same (.../MMCA.Common.Grpc/ResultGrpcExtensions.cs:125, in ToRpcException at :120, argued in its summary from :104). Only the status is ranked: every error still travels in the ProblemDetails errors array (ErrorHttpMapping.cs:65-74) and in the gRPC trailers as error-{i}-code / -message / -type (ResultGrpcExtensions.cs:136-138). Ranking in one place is what makes the two transports agree; the previous arrangement, with the table inside MMCA.Common.API, left gRPC classifying an aggregate by its first error while HTTP classified it by its worst.

  • Exceptions are reserved for the genuinely exceptional: programming errors (null-argument guards) and infrastructure faults (DB / transaction failures) that should abort the request rather than be modeled as a business outcome.

  • When an exception does escape to the HTTP edge, the API layer converges it onto the same RFC 9457 ProblemDetails shape via an ordered IExceptionHandler chain, so both channels (Result and exception) return one wire contract. AddCommonExceptionHandlers() first registers AddProblemDetails (which stamps a requestId extension from the request's trace identifier), then registers the handlers in a load-bearing order; ASP.NET Core runs them in registration order and stops at the first handler that reports the exception handled, so most-specific-first placement is the mechanism, not a comment (MMCA.Common/Source/Presentation/MMCA.Common.API/DependencyInjection.cs:157-168, registrations at lines 162-165):

    • OperationCanceledExceptionHandler (registered first) maps a client-disconnect OperationCanceledException to the non-standard HTTP 499 Client Closed Request, so monitoring can tell an abandoned request apart from a server fault (MMCA.Common/Source/Presentation/MMCA.Common.API/Middleware/OperationCanceledExceptionHandler.cs:38-39, status set at :46). It answers a DbException raised after the client has gone the same way, because a data provider may report the cancelled command as its own exception (SqlClient raises a SqlException); it is still logged with its stack at warning, and any other exception type, or a DbException while the client is connected, falls through to the generic handler (:17-22).
    • DbUpdateExceptionHandler maps an EF Core DbUpdateException (concurrency, unique-constraint, or foreign-key failure) to HTTP 409 Conflict, returning a generic detail so no database schema detail leaks to the client; the full exception is logged at error, and a concurrency conflict (only that kind) is also counted in a metric (MMCA.Common/Source/Presentation/MMCA.Common.API/Middleware/DbUpdateExceptionHandler.cs:29,32,41,45, the metric at :36-39).
    • ValidationExceptionHandler maps a FluentValidation ValidationException to HTTP 400, grouping the failures by property name into an errors extension that matches ASP.NET Core's model-validation shape (MMCA.Common/Source/Presentation/MMCA.Common.API/Middleware/ValidationExceptionHandler.cs:28,33,48-54).
    • GlobalExceptionHandler (registered last) is the catch-all that turns any remaining unhandled exception into HTTP 500 (MMCA.Common/Source/Presentation/MMCA.Common.API/Middleware/GlobalExceptionHandler.cs:100-113, status set at :102). It maps two exceptions by type before that fallback, both caller faults rather than server faults and both logged at warning rather than error. A CrossTenantWriteException (the save-time tenant-boundary rejection, .../MMCA.Common.Infrastructure/Persistence/Interceptors/CrossTenantWriteException.cs:24) is answered with HTTP 400, because a tenant-scoped API refusing an untenanted write is routine (:54-72, the warning at :58, the 400 at :60). The special case sits inside the catch-all rather than in its own handler because the exception derives from InvalidOperationException, so no handler ahead of this one claims it, and every other save-time invariant failure of that family still ends at the 500 (:14-19). The response body names no tenant id and no entity type: echoing either would tell an unauthorized caller which tenant owns the row it just tried to write, so the detail is a fixed string and the full failure stays in the log (:38-46). A BadHttpRequestException (a body over the endpoint's request size limit, or an unreadable request) is answered with the status the exception itself carries, passed through unchanged (:82, :89): a 413 gets a "Payload Too Large" title and detail, and any other status (400 for an unreadable request, or another client status Kestrel assigns) gets the fixed "Bad Request" pair (:74-98, the title and detail at :90-95).

The client half: the UI layer returns Result too (2026-08-27)

Until v1.164.0 this record held everywhere except the one layer a user actually sees. A UI service called the API, pulled the domain wording out of the ProblemDetails body, and rethrew it as a DomainInvariantViolationException for the page to catch: the pattern was inverted at the last hop, and every page paid for it with a try/catch around a call whose failure was entirely expected. That deviation is retired. Every HTTP-typed client service in MMCA.Common.UI now returns Result / Result<T>, and ServiceExceptionHelper is deleted rather than deprecated.

Two halves make a service method honestly typed, and they are deliberately separate types:

  • ProblemDetailsResultReader converts a response. (MMCA.Common/Source/Core/MMCA.Common.Shared/Http/ProblemDetailsResultReader.cs:58.) It is the exact reverse of ApiControllerBase.HandleFailure: ReadAsync(response, ct) answers a valueless Result (:253) and ReadAsync<T>(response, options, ct) deserializes a 2xx body or parses the failure (:288), with the pure ParseProblemDetails(status, body) core testable against captured payloads (:155). It understands four payload shapes (:20-49): the MMCA error array, where code, message, type, source and target all round-trip and type parses straight back into ErrorType (:350-385, the type read at :377, the parse at :434-439); the ASP.NET Core validation dictionary, which yields one error per message coded Validation.{property} (or Validation for an empty key) with the category taken from the status (:387-432, the code at :394-396); plain ProblemDetails with no errors extension; and a non-JSON or empty body. Each of the last two synthesizes one error coded Http.{status} (:157-178, :203, built at :441-445, the code at :502-503). Property lookup is case-insensitive on purpose, because a hand-built PascalCase payload would otherwise silently lose every field (:469-500). It lives in MMCA.Common.Shared and uses nothing beyond the BCL, because the consumer is MMCA.Common.UI, which references Shared only (:14-19).
  • HttpResultExecutor converts the absence of one. (.../MMCA.Common.UI/Services/Api/HttpResultExecutor.cs:35.) It does not make the request: it takes the caller's whole send-and-read operation as a Func<Task<Result>> / Func<Task<Result<T>>> and wraps it (:56, :91), so the two halves compose without either knowing the other's shape. A refused connection, a DNS failure, a dropped socket, an unreadable body (HttpRequestException, IOException, JsonException), or a call the client's resilience pipeline refused to run or finish (Polly's ExecutionRejectedException, the base of TimeoutRejectedException and BrokenCircuitException) becomes a failed Result coded Http.TransportFailure (the fault set at :118-128, caught at :77, :112, built at :130-133, code at :38). An HttpClient timeout, which surfaces as an OperationCanceledException with the caller's token not cancelled, becomes Http.Timeout (:135-136, code at :41); a timeout raised by a Polly strategy instead arrives as a TimeoutRejectedException and is classed with the transport faults. Both are built as Error.Unexpected (:133, :136). Anything else is a genuine programming fault and keeps travelling as an exception (:124-125). The exception's own text goes on Error.Source, never on Message, because it is diagnostic detail that is neither localizable nor safe to render (:130-133). The executor only sees the faults the wrapped operation lets escape: when that operation reads through ProblemDetailsResultReader, the reader catches a body-read HttpRequestException itself and falls back to the status-only result (ProblemDetailsResultReader.cs:338-347), which for the typed ReadAsync<T> on a 2xx is a failure coded Http.EmptyResponse (:296, :303-310; the valueless ReadAsync returns success on a 2xx without reading the body, :259-262), and it catches a JsonException on a 2xx body as Http.MalformedResponse (:323-326). That last failure carries the JsonException text on Message, not on Source (:325), so the reader does not follow the executor's rule, and the page-side lookup below renders that text as the message.

OperationCanceledException is the one exception that still crosses the boundary, and that is the decision, not an omission. When the caller's own token is why the operation stopped, the cancellation is rethrown (HttpResultExecutor.cs:69-72, :104-107, argued at :18-24): a disposed component or a superseded grid fetch owns its own cancellation and must not have it handed back as an error to render. A client timeout raises the same exception type with the token not cancelled, and that one does become a failure (:73-76, :108-111). The token is also checked before the call, so an already-abandoned request never reaches the network (:63, :98).

Pages branch; they do not catch. ResultUiExtensions (.../MMCA.Common.UI/Common/ResultUiExtensions.cs:74) is the page-side idiom, written once so no page hand-rolls it. A page unwraps with the instance Result<T>.TryGetValue (Result.cs:218-228); the one TryGetValue left here is the overload that also hands the errors back on the failing branch (ResultUiExtensions.cs:103-120). That overload decides on IsSuccess and a non-null value (:110), so a success carrying a null value takes its failing branch with an empty error list (stated at :90-95), where the instance method returns true because it decides on IsFailure alone (Result.cs:220-227). Back in ResultUiExtensions.cs, OnFailureSetError pushes the composed message into a page field (:214, :226) and NotifyOnFailure raises it as exactly one snackbar, never one per error (:255, :276); and HasErrorType with IsNotFound / IsUnauthorized lets a page turn a 404 into an empty state and a 401 into a redirect instead of an alert (:294-298, :306, :314). Messages are localized as resource keys with pass-through, so one call site handles both an API error the server already translated and a client-side error whose Message is a key (:23-27, Localize at :373-382, ADR-027). Three kinds of client-synthesized failure have no server-phrased message to pass through, so they are looked up by their error code instead: a bodiless Http.{status} (recognized through ProblemDetailsResultReader.TryGetSynthesizedStatus, :326), then the generic Http.Status format, plus Http.TransportFailure and Http.Timeout (:27-33, LocalizeError at :316-339, the transport check at :333). The reader's other two synthesized codes, Http.EmptyResponse and Http.MalformedResponse (ProblemDetailsResultReader.cs:71, :77), are not in that lookup: they fall through to the message pass-through (ResultUiExtensions.cs:338), and SharedResource.resx holds no key for either (it carries Http.Status, the Http.{status} sentences, Http.TransportFailure and Http.Timeout, .../MMCA.Common.UI/Resources/SharedResource.resx:844, :847-877, :880, :883), so they render their English message. Each code resolves through the localizer the page passed and then, when that localizer has no such key, through the framework's own SharedResource pair for the current UI culture, so a page passing its own IStringLocalizer<PageType> still shows the translated sentence; the English message is the last resort (:30-33, the two-step lookup at :343-349 and :352-362). The lookup runs only when a localizer is passed: OnFailureSetError and NotifyOnFailure default it to null (:214, :226, :258, :279), and with none LocalizeError returns the raw English message without consulting SharedResource (:318-321). A transport or timeout code is replaced only while it still carries the executor's own English sentence, so a caller that reused the code with a message of its own keeps that message (:366-371). The messages are deduplicated and ordered by the same ErrorTypeSeverity rank the edges use, so a real 403 leads and an incidental validation message never buries it (:132-146, the ordering at :142, the deduplication at :145). The shared ErrorSummary component renders the same list as one deduplicating MudAlert, taking a failed Result and the MudForm.Errors shape together and rendering nothing at all when there is nothing to say (.../MMCA.Common.UI/Components/Forms/ErrorSummary.razor:8, both shapes merged at :87-105, one message inline and several as a list so a screen reader announces them as several items, :17-31).

A component that shows a retry needs the failure, not an exception. MobileInfiniteScrollList takes one page fetcher, FetchPageResult, a required delegate returning Task<Result<(IReadOnlyList<TItem> Items, int TotalItems)>> (.../MMCA.Common.UI/Components/Lists/MobileInfiniteScrollList.razor.cs:47), and renders the failure's localized message beside its inline retry affordance (:187-193 into SetLoadFailed at :191, the message read from the failed Result at :289). A tuple-returning delegate is not offered beside it: a tuple has no way to carry a failure at all, so the component would be left showing a Retry button that cannot name what it is retrying. The delegate is checked at initialization, so a call site that omits it throws instead of rendering as a load failure that can never succeed (:104-116, the guard at :111, the throw at :113-114).

The error Code is a public vocabulary, gated for uniqueness (2026-09-03)

Code is the half of a failure that crosses the wire verbatim (ErrorHttpMapping.cs:65-74) and the key ADR-027 localizes the message by, so a client switches on Order.NotFound and a support ticket quotes it. Two modules that both ship Item.Invalid make that vocabulary ambiguous, and the ambiguity only surfaces in production (MMCA.Common/Source/Hosting/MMCA.Common.Testing.Architecture/Rules/Contracts/ArchitectureRules.ErrorCatalog.cs:54-59). The catalog is therefore frozen the way ADR-010 froze integration-event schemas and ADR-015 Section B froze the .proto contracts. An IL scan (the testing package's own metadata reader) reads the Error factory call sites it recognizes (CollectErrorCodesIn at :226, IsErrorFactory at :285-287, the recognized members at :39-52) across every module layer of the map except UI: the per-module Domain, Application, Shared, API and Infrastructure assemblies (:30-31, the reason at :25-28), because a shared value type, a controller, an MCP reader or an infrastructure adapter hands its code to a client exactly as a handler does (since MMCA.Common v1.335.0, MMCA.Common/CHANGELOG.md:15). The recognized set covers every code-first factory, Error.TooManyRequests included (ArchitectureRules.ErrorCatalog.cs:48, the factory at Error.cs:112-113), plus the primary constructor (ArchitectureRules.ErrorCatalog.cs:51, described at :33-38); ErrorCodesAreUnique (:92) fails the build when one literal code is constructed by more than one declaring type (:101-102), and ErrorCodesUseAnAllowedPrefix (:132) requires the owning prefix. A code built at run time is reported as UNVERIFIABLE rather than passed or failed (:181-184, :299). Consumers subclass ErrorCatalogTestsBase (.../Bases/Contracts/ErrorCatalogTestsBase.cs:26, the three facts at :52, :56, :60) and allowlist a deliberately shared code (:41-42) rather than rename a shipped one: Store (MMCA.Store/Tests/Architecture/MMCA.Store.Architecture.Tests/Contracts/ErrorCatalogTests.cs:19), ADC (MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Contracts/ErrorCatalogTests.cs:20) and Helpdesk (MMCA.Helpdesk/Tests/Architecture/MMCA.Helpdesk.Architecture.Tests/Governance/ErrorCatalogTests.cs:24) do; MMCA.Common ships no module catalog and self-tests the rules against fixtures instead (MMCA.Common/Tests/Architecture/MMCA.Common.Architecture.Tests/Contracts/ErrorCatalogFitnessTests.cs:16).

Rationale

  • Failures are in the signature. A method that can fail returns Result<T>, so the caller cannot silently ignore the failure path the way an uncaught exception allows.
  • Category, not status code, at the core. ErrorType keeps Domain and Application transport- agnostic; only the API (or gRPC interceptor) translates it, so the same handler serves REST and gRPC.
  • Composable. The railway-oriented combinators chain steps without an IsFailure check at every line, and short-circuit on the first failure. The implicit conversions are what keep the ceremony proportional: a guard clause returns the Error itself (Result.cs:50), so the cheapest thing to write is also the correct one.
  • An aggregate answers with its worst problem. Ranking the categories makes the status independent of the order invariants happen to be evaluated in, which is the one thing a caller cannot see and the one thing Result.Combine makes arbitrary (ErrorHttpMapping.cs:44-51, restated on the enum itself at ErrorType.cs:5-11).
  • Cheap and predictable. No throw/catch on the common "won't do it" path.
  • One wire contract for both channels. Whether a request ends in a Result.Failure mapped by HandleFailure() or an escaped exception caught by the handler chain, the client receives an RFC 9457 ProblemDetails body, so consumers parse one error shape regardless of which channel produced it. The shared requestId extension is stamped by the AddProblemDetails customization (DependencyInjection.cs:159-161); on a non-empty error list HandleFailure builds its body directly and returns it through StatusCode(...) (ApiControllerBase.cs:65-77), and the shared conformance base accepts either an errors list or a correlation id on that body (MMCA.Common/Source/Hosting/MMCA.Common.Testing/Conformance/ProblemDetailsContractTestsBase.cs:76-80), so no test pins requestId on the Result channel.
  • The layer with the most expected failures had the least Result. A UI service call fails for every reason this record was written about: the input was rejected, the record is gone, the caller signed out. Converting the response back into an exception at the last hop meant the one layer whose whole job is rendering failure was the one layer that had to catch, and it made a business-rule violation and a dropped socket arrive the same way. Returning Result there closes the round trip: the category the domain produced is the category the page branches on.
  • Ranking in Shared rather than at each edge is what makes "the same aggregate" mean something. A ranking table copied into two presentation packages is two tables, and the gRPC edge proved it by classifying by position while HTTP classified by severity. One table in the layer both edges already reference removes the possibility rather than the habit.

Trade-offs

  • More ceremony at call sites than letting an exception bubble; the combinators absorb most of it.
  • Two error channels coexist (Result for expected, exceptions for exceptional). The boundary is a judgment call: "could a well-behaved caller reasonably trigger this?" then return a Result, otherwise throw.
  • One status still has to stand for a whole list. Severity ranking removes the ordering dependency but not the collapse: a failure carrying a 403 and a 400 answers 403, and the 400 is visible only to a client that reads the errors array (ErrorHttpMapping.cs:65-74). The two 400-mapped categories share one rank (ErrorTypeSeverity.cs:49-50), so among them the earliest error still wins.
  • The reverse mapping is lossy on 400, and only between Validation and Invariant. A client reading an MMCA error array gets the original ErrorType verbatim, because the edge writes Type as a field (ErrorHttpMapping.cs:65-74, the name at :70) and the reader parses it back (ProblemDetailsResultReader.cs:380, :437-439). Every other payload shape (a validation dictionary, a plain ProblemDetails, a non-JSON body) has to derive the category from the status code, and the forward map sends Validation and Invariant both to 400, so the reverse can only pick one: it picks Validation (:97-109, which also maps 503 back to Unavailable at :101 and 429 to TooManyRequests at :107, and reads any other 4xx as Validation and any other status as Unexpected, :140; admitted twice at :50-57 and :126-129, pinned by MMCA.Common/Tests/Core/MMCA.Common.Shared.Tests/Http/ProblemDetailsResultReaderTests.cs:238). A client that needs Invariant distinguished from Validation must call an endpoint that emits the error array, which every ApiControllerBase failure does but an escaped exception handled by the handler chain does not.
  • The UI's Result surface is a breaking change for every consumer page. Retiring the deviation moved MMCA.Common.UI's public API by 41 removals and 98 additions in one release, so every page that wrapped a service call in try/catch had to be rewritten to branch. That is the cost of having deferred the conversion: the deviation was cheap to keep and expensive to remove, and it grew with every page added while it stood.
  • An exception reaching a page still costs it the reason. Where a failed Result carries a localized message the page can render, an exception that escapes a consumer-supplied fetcher falls back to a generic resource string, because its own text is neither translatable nor safe to render (MobileInfiniteScrollList.razor.cs:210-219, SetLoadFailed(failure: null) at :218, the fallback stated at :281-285, SetLoadFailed itself at :286-290). Returning Result is what makes the specific message available at all; nothing forces a call site to produce one.
  • The exception-handler registration order is load-bearing. Because ASP.NET Core stops at the first handler that reports the exception handled, a mis-ordered registration (for example the catch-all GlobalExceptionHandler ahead of a specific handler) would swallow the more precise status; GlobalExceptionHandler must stay registered last (MMCA.Common/Source/Presentation/MMCA.Common.API/DependencyInjection.cs:162-165).

Revision (2026-10-01)

No decision or rationale changed. Citations were re-anchored to the current source after line shifts: the gRPC status table, ToRpcException ranking and trailer writes in ResultGrpcExtensions.cs (:36-48, :121-123, :133-135); AddCommonExceptionHandlers (DependencyInjection.cs:149-161, registrations :154-158) and the 499 handler (OperationCanceledExceptionHandler.cs:29-30,37); the ProblemDetailsResultReader members; the ResultUiExtensions page helpers; the ErrorSummary merge and list rendering; and MobileInfiniteScrollList, whose failure path now runs through SetLoadFailed (MobileInfiniteScrollList.razor.cs:278-282).

Revision (2026-10-06)

The decision is unchanged; additive behavior that had shipped without being recorded is now described:

  • ErrorType has ten categories: TooManyRequests (a lockout) maps to HTTP 429 (ErrorHttpMapping.cs:31), gRPC ResourceExhausted (ResultGrpcExtensions.cs:49), severity rank 45 between Forbidden and Conflict (ErrorTypeSeverity.cs:43), and back from 429 in the reader (ProblemDetailsResultReader.cs:105).
  • GlobalExceptionHandler maps two exceptions by type, not one: BadHttpRequestException is answered with the status it carries, at warning level, titled "Payload Too Large" for a 413 and "Bad Request" for any other status (GlobalExceptionHandler.cs:72-95, the status at :79, :86).
  • HttpResultExecutor also treats Polly's ExecutionRejectedException as a transport fault (HttpResultExecutor.cs:125-126), so a resilience-pipeline timeout reads as Http.TransportFailure; only an HttpClient timeout reads as Http.Timeout.
  • Corrected: the validation dictionary yields Validation.{property} codes, one per message. Http.{status} is the fallback code wherever no code is supplied: a plain ProblemDetails, a non-JSON or non-object body, an errors extension that parses to nothing (ProblemDetailsResultReader.cs:178, :197-203), and an MMCA array entry that is a bare string or an object with no code (:366, :380).
  • Added: client-synthesized failures are localized by error code (ResultUiExtensions.cs:339-365).
  • Corrected: TapAsync and MatchAsync do not delegate to the instance combinator of the same name, though they short-circuit identically (ResultExtensions.cs:84-90, :111-112).
  • Noted: the error-catalog IL scan does not recognize Error.TooManyRequests (ArchitectureRules.ErrorCatalog.cs:17-29).
  • All live-section anchors were re-verified against current source. The 2026-10-01 anchors for the gRPC table and trailers now read ResultGrpcExtensions.cs:37-50, :123-125, :135-137, and the SetLoadFailed failure path MobileInfiniteScrollList.razor.cs:301-305.

Revision (2026-10-07)

Re-verified against current source. The decision, the combinator surface, the ten categories, the severity ranking, the exception-handler chain and the executor's fault classification are unchanged; one behavior was added, one description moved, and most anchors into six files shifted with the v1.232.1 release (HttpResultExecutor.cs:18-24 and ErrorSummary.razor:8 / :17-31 did not move).

  1. Added: a client-synthesized failure (Http.{status}, Http.Status, Http.TransportFailure, Http.Timeout) resolves through the page's localizer and then through the framework's own SharedResource pair for the current UI culture, with the English message only as the last resort, and a transport or timeout code is replaced only while it still carries the executor's own English sentence (ResultUiExtensions.cs:30-33, :377-383, :386-397, :398-405). The lookup runs only when a localizer is passed; with none, LocalizeError returns the English message unchanged (:352-355, the null defaults at :248, :260, :292, :313).
  2. Corrected: the error-catalog rule's summary states that its recognized list omits Error.TooManyRequests (ArchitectureRules.ErrorCatalog.cs:11-15); the gap itself is unchanged (:19-31, Error.cs:103).
  3. Anchors re-verified against current source: ResultExtensions.cs:14, :24-33, :43-52, :62-71, :81-95, :89-92, :106-117, :115-116; GlobalExceptionHandler.cs:14-19, :38-46, :54-72 (:58, :60), :74-98 (:82, :89, :90-95), :100-113 (:102); HttpResultExecutor.cs:35, :38, :41, :56, :63, :69-72, :73-76, :77, :91, :98, :104-107, :108-111, :112, :118-128 (the fault set, with ExecutionRejectedException at :128), :124-125, :130-133, :135-136; ResultUiExtensions.cs:23-27, :74, :103-118, :110-114, :137, :166-180, :248, :260, :289, :310, :328-332, :340, :348, :350-373, :407-416; ErrorSummary.razor:87-105; ArchitectureRules.ErrorCatalog.cs:33-39, :64, :75, :104, :149-157, :171, :185-191, :207-208, :212-215, :219-224. The 2026-10-06 entry above keeps its anchors as written; its ResultExtensions.cs:84-90 / :111-112, GlobalExceptionHandler.cs:72-95 / :79 / :86, HttpResultExecutor.cs:125-126, ResultUiExtensions.cs:339-365 and ArchitectureRules.ErrorCatalog.cs:17-29 now read :89-92 / :115-116, :74-98 / :82 / :89, :127-128, :350-373 and :19-31. Spot checks found ErrorHttpMapping.cs:30-31, ResultGrpcExtensions.cs:48-49, ErrorTypeSeverity.cs:43, Error.cs:103 and :126-127, and MobileInfiniteScrollList.razor.cs:301-305 still correct.

Revision (2026-10-21)

Re-verified against current source. The decision, the combinator surface, the ten categories, the severity ranking, the exception-handler order, and the MobileInfiniteScrollList failure behavior are unchanged; one gap recorded by the earlier revisions is closed, the 499 handler claims one more exception type, and anchors into four files moved.

  1. Changed: the error-catalog IL scan now recognizes Error.TooManyRequests (ArchitectureRules.ErrorCatalog.cs:26, in the recognized list at :17-30), so a code built through that factory is checked for uniqueness and prefix like any other, and the list's summary no longer states a gap (:11-16). Shipped in v1.247.0 (MMCA.Common/CHANGELOG.md:93). The 2026-10-06 "Noted" item and 2026-10-07 item 2 above describe the earlier state.
  2. Moved: SetLoadFailed, at MobileInfiniteScrollList.razor.cs:301-305 when the 2026-10-07 spot check ran, has since moved (v1.234.1); those lines are now ResetAsync code, and SetLoadFailed sits at :266-270.
  3. Changed: OperationCanceledExceptionHandler also answers 499 for a DbException raised after the client disconnects, since a data provider may report the cancelled command as its own exception; it is logged at warning with its stack, and a DbException while the client is connected still falls through to the 500 (OperationCanceledExceptionHandler.cs:17-22, the type and disconnect guard at :38-39, the 499 at :46). Shipped in v1.241.0 (MMCA.Common/CHANGELOG.md:230).
  4. Anchors re-verified against current source: DependencyInjection.cs:154-166 (AddProblemDetails at :156-158, registrations :159-163, GlobalExceptionHandler last at :163); OperationCanceledExceptionHandler.cs:17-22, :38-39, :46; MobileInfiniteScrollList.razor.cs:37, :94-106 (guard at :101, throw at :103-104), :169-175 (:173), :191-199 (:198), :261-264, :266-270 (:269); ArchitectureRules.ErrorCatalog.cs:32-38, :63, :74, :103, :148-156, :170, :184-190, :206-207, :211-214, :218-223; Error.cs:103-104.

Revision (2026-10-26)

Re-verified against current source. The decision, the ten categories, the severity ranking, the exception-handler order and the localization behavior are unchanged; v1.252.0 moved the unwrap idiom onto Result<T> itself, which shifted every generic Result.cs anchor, and anchors into ResultUiExtensions.cs and DbUpdateExceptionHandler.cs moved.

  1. Changed: TryGetValue is now the instance method Result<T>.TryGetValue, deciding on IsFailure (MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/Result.cs:218-228, the check at :220); the one-argument ResultUiExtensions.TryGetValue is removed (MMCA.Common/CHANGELOG.md:201). The remaining ResultUiExtensions.TryGetValue overload hands the errors back and decides on IsSuccess with a non-null value, so a success carrying a null value takes its failing branch there (ResultUiExtensions.cs:103-120, the check at :110, documented at :90-95). The live text no longer attributes the IsFailure decision to the UI extension.
  2. Added: DbUpdateExceptionHandler counts a DbUpdateConcurrencyException (and only that kind) through ConcurrencyConflictMetrics.RecordConflict before answering 409 (DbUpdateExceptionHandler.cs:36-39); the client detail stays the fixed generic string (:45).
  3. Anchors re-verified against current source: Result.cs:254-258, :270, :250-253, :266-269, :281-289, :297-301, :310-314, :323-327, :335-345, :355-366, :376-386, short-circuits :300, :313, :326, :360-363 (the non-generic :43, :49-53, :155, :169, :187 did not move); DbUpdateExceptionHandler.cs:29, :32, :41, :45; ResultUiExtensions.cs:132-146 (:142, :145), :214, :226, :255, :258, :276, :279, :294-298, :306, :314, :316-339 (:318-321, :326), :343-349, :352-362, :366-371, :373-382 (:23-27, :27-33, :30-33 and :74 did not move). The 2026-10-21 entry above keeps its CHANGELOG.md:93 and :230 as written; the v1.247.0 and v1.241.0 entries now sit at CHANGELOG.md:308 and :445.

Revision (2026-10-28)

Re-verified against current source. The decision, the ten categories, the severity ranking, the exception-handler order, the executor's fault set and the code-based localization lookup are unchanged; three live descriptions were broader than the code, and are narrowed.

  1. Corrected: the code-based lookup covers only a bodiless Http.{status} and the executor's Http.TransportFailure / Http.Timeout (ResultUiExtensions.cs:326, :333, :366-371). The reader's Http.EmptyResponse and Http.MalformedResponse (ProblemDetailsResultReader.cs:71, :77) fall through to the message pass-through (ResultUiExtensions.cs:338) and have no SharedResource.resx key (SharedResource.resx:796, :832, :835), so they render in English.
  2. Added: when the wrapped operation reads through ProblemDetailsResultReader, the reader handles a body-read HttpRequestException (ProblemDetailsResultReader.cs:338-347, an Http.EmptyResponse on a 2xx for the typed ReadAsync<T> at :303-310; the valueless ReadAsync does not read a 2xx body, :259-262) and a 2xx JsonException (Http.MalformedResponse, :323-326) before the executor sees them, and that malformed-response failure carries the exception text on Message (:325), unlike the executor, which puts it on Source (HttpResultExecutor.cs:130-133).
  3. Corrected: the Rationale no longer states that the Result channel carries requestId. The extension is stamped by the AddProblemDetails customization (DependencyInjection.cs:156-158), HandleFailure builds and returns its body directly on a non-empty error list (ApiControllerBase.cs:50-60; the empty-list branch returns Problem(...), :39-45), and the conformance base accepts errors or a correlation id (ProblemDetailsContractTestsBase.cs:77-81).
  4. Anchors re-verified against current source: ResultUiExtensions.cs:27-33, :316-339, :326, :333, :338, :366-371; ProblemDetailsResultReader.cs:71, :77, :303-310, :323-326, :338-347; HttpResultExecutor.cs:127-128, :130-133; ApiControllerBase.cs:50-60. The 2026-10-26 entry above keeps its CHANGELOG.md anchors as written; the one-argument ResultUiExtensions.TryGetValue removal now sits at MMCA.Common/CHANGELOG.md:244, and the v1.247.0 and v1.241.0 headings at :303 and :474.

Revision (2026-11-23)

Re-verified against current source. The decision, the ten categories and their HTTP and gRPC mappings, the severity ranking, the all-errors ProblemDetails body, the exception-handler order and the MobileInfiniteScrollList failure behavior are unchanged; one field and one header were added without being recorded, and anchors into seven files moved.

  1. Added: Error carries an init-only TimeSpan? RetryAfter, null by default, set with with { RetryAfter = ... } on a TooManyRequests error (MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/Error.cs:31-37); the sign-in lockout sets it (MMCA.Common/Source/Core/MMCA.Common.Infrastructure/Auth/LoginProtectionService.cs:107).
  2. Added: HandleFailure answers a 429 with a Retry-After header taken from the longest RetryAfter among its TooManyRequests errors, formatted by RetryAfterHeader.Format; any other status, or a 429 carrying no positive hint (a null, zero or negative RetryAfter, :97), sends no header (ApiControllerBase.cs:74, SetRetryAfter at :79-101, the header at :99). Shipped in v1.295.0. The value is not part of the errors projection (ErrorHttpMapping.cs:65-74), and neither ProblemDetailsResultReader nor the gRPC edge reads or writes it, so it does not round-trip.
  3. Anchors re-verified against current source: ErrorHttpMapping.cs:23-35 (Unexpected at :33, TooManyRequests at :34), :44-51, :54-55, :65-74; Error.cs:111-112, :134-135; ApiControllerBase.cs:49-77 (empty-list Problem(...) at :53-59, status at :62, body at :64-72, StatusCode(...) at :76); DependencyInjection.cs:157-169 (AddProblemDetails at :159-161, registrations :162-166, GlobalExceptionHandler last at :166); SharedResource.resx:844, :847-877, :880, :883; MobileInfiniteScrollList.razor.cs:47, :104-116 (:111, :113-114), :187-193 (:191), :210-219 (:218), :281-285, :286-290 (:289); ProblemDetailsContractTestsBase.cs:76-80. The dated entries above keep their anchors as written; their CHANGELOG.md line numbers are best read by version heading.

Revision (2026-11-30)

Re-verified against current source (MMCA.Common v1.323.0, MMCA.Common/CHANGELOG.md:7). The Result-over-exceptions decision, the edge-only transport mapping, the all-errors ProblemDetails body, severity-ranked status selection, the UI layer's Result surface and the error-catalog gate are unchanged; the category set, the combinator surface, the construction rules and the exception-handler chain moved.

Context. ErrorType.Failure ("general/unclassified", HTTP 400, severity 10) had become the default for dependency outages, timeouts and host misconfiguration, so a caller was told to fix a request that was well formed, 5xx alerting never saw the outage, and the timeout decorators documented that the taxonomy had no member for them.

Decision.

  1. ErrorType.Unavailable is the category for a dependency that failed or did not answer in time (MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/ErrorType.cs:61-67, factory at Error.cs:125-126): HTTP 503 (ErrorHttpMapping.cs:34), gRPC Unavailable in both directions (ResultGrpcExtensions.cs:50, rebuilt from a trailer through :274), severity 65 between Unexpected and Unauthorized (ErrorTypeSeverity.cs:42), a RetryAfter on it answered as the 503's Retry-After header (ApiControllerBase.cs:96-98, :110), and 503 read back as Unavailable (ProblemDetailsResultReader.cs:101). Failure and Error.Failure are removed, so every error names a meaning: Validation, Invariant or UnprocessableEntity when the caller can fix the request, Unavailable when retrying later can succeed, Unexpected when neither holds (ErrorType.cs:13-16). Member values are pinned explicitly and 7 is retired (:16-18, :53, :59, :67). The reader reads any other unmapped 4xx as Validation (ProblemDetailsResultReader.cs:140), the gRPC trailer decoder rebuilds an unknown type as Unexpected (ResultGrpcExtensions.cs:279-284), the timeout decorators return Request.TimedOut as Unavailable (ADR-014, Revision 2026-11-30), and the error-catalog rule recognizes the Unavailable factory (ArchitectureRules.ErrorCatalog.cs:27, in the list at :17-30). Every framework site that returned Failure was reclassified (MMCA.Common/CHANGELOG.md:9, :11).
  2. The unused railway helpers are removed: ResultExtensions (BindAsync, MapAsync, MatchAsync, TapAsync over Task<Result<T>>), Result<T>.Ensure, Result<T>.Tap, Result<T>.MatchAsync and Result.OnFailure (MMCA.Common/CHANGELOG.md:13). Match, Map, Bind, BindAsync, Combine, TryGetValue and the implicit conversions remain, with early return through TryGetValue as the idiom for a multi-step handler.
  3. The Result() constructor and AddErrors are private protected (Result.cs:31, :64) and Result<T> is sealed (:192), so a Result is built only through its factories and conversions and cannot be subclassed outside MMCA.Common.Shared.
  4. DomainException, DomainInvariantViolationException and DomainExceptionHandler are deleted, since nothing threw them (MMCA.Common/CHANGELOG.md:15); AddCommonExceptionHandlers() registers four handlers, OperationCanceled, DbUpdate, Validation and Global (DependencyInjection.cs:162-165).

Consequences. Outages surface as 503 or 500 and reach 5xx alerting. The reverse mapping is lossy only between Validation and Invariant (ProblemDetailsResultReader.cs:50-57). A reader that does not recognize a type name falls back to the status-derived type (:50-52, :437-439), and a reader with no 503 entry derives a 5xx as Unexpected, the rule this reader still applies to every other 5xx (:124, :140). HttpResultExecutor transport and timeout errors stay Unexpected (MMCA.Common/CHANGELOG.md:9). Breaking for external consumers, mapped in MMCA.Common/UPGRADING.md:35.

Alternatives rejected. Keeping Failure and only moving sites (leaves the unclassified bucket that caused the drift); mapping outages to Unexpected alone (loses the retry-later signal and Retry-After); adopting the railway combinators codebase-wide (the early-return sites already read well and debug more easily).

Corrected in place. The Status line; the Decision's category list, the Unexpected, TooManyRequests and Unavailable descriptions and the pinned-values sentence (it said TooManyRequests was appended last so earlier values would not move); the RetryAfter producer sentence; the combinator surface (the MatchAsync, Tap, Ensure, OnFailure and ResultExtensions entries removed); the HTTP Retry-After sentence, which now covers a 503; the gRPC table; the severity ranking; the DomainExceptionHandler step of the exception-handler chain; and the two 400 trade-offs (two categories share the 400 rank, not three). The earlier dated sections keep their wording as historical records, including the 2026-08-27 subsection's account of the retired rethrow.

Anchors re-verified against current source: ErrorType.cs:5-11, :13-16, :16-18, :47-53, :49-51, :55-59, :61-67; Error.cs:31-38, :112-113, :125-126, :131-133, :140-141; Result.cs:31, :50, :56-60, :64, :75, :108, :131-152, :162-168, :176-180 (:179), :192, :206-216 (:208), :242-246, :258, :269-277, :285-289 (:288), :298-302 (:301), :311-315 (:314); ErrorTypeSeverity.cs:16-27, :22, :32, :39-51, :49-50, :53-57, :60, :72-99, :86-87, :91; ErrorHttpMapping.cs:23-35 (Unexpected :32, TooManyRequests :33, Unavailable :34), :44-51, :54-55, :65-74 (:70); ApiControllerBase.cs:50-78 (empty-list Problem(...) at :56-59, status at :63, body at :65-73, SetRetryAfter call at :75, StatusCode(...) at :77), :89-112 (:92-103, :108, :110); ResultGrpcExtensions.cs:41-50, :104, :120, :125, :136-138, :274, :279-284; DependencyInjection.cs:157-168 (AddProblemDetails at :159-161, registrations :162-165, GlobalExceptionHandler last at :165); ProblemDetailsResultReader.cs:50-57, :97-109 (:101, :107), :124, :126-129, :140, :380, :437-439. The 503 row moved the reader's members, so the reader anchors in "The client half" above read, by member: ProblemDetailsResultReader :59, EmptyResponseCode :72, MalformedResponseCode :78, ParseProblemDetails :158, ReadAsync :256, ReadAsync<T> :291, the JsonException catch :326 (message at :328), the body-read HttpRequestException catch :345, ReadErrorArray :353, ReadErrorObject :376 (type read at :380), ReadValidationDictionary :390, ParseErrorType :437, SynthesizeError :444, the case-insensitive lookup :493.

ADR-007 (Result over the wire via gRPC, the second edge the shared severity ranking now serves), ADR-014 (the decorator pipeline returns Result.Failure to short-circuit a command before it reaches the handler), ADR-094 (the client base hierarchy whose dispatch method now ends in a Result instead of a rethrow, and which owns the retry and idempotency behavior around it), ADR-027 (the localization contract the page-side helpers honor: an API message arrives already translated, a client-side one is a resource key, and pass-through lookup serves both from one call site).