Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[📝] Add either result adr #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/adr/.adr-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result-return
26 changes: 26 additions & 0 deletions doc/adr/result-return/0001-record-architecture-decisions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 1. Record architecture decisions

Date: 2021-11-21

## Status

Accepted

## Context

We need to create modern and domain oriented result type to descrbe domains failures.
Indeed:

- Domain failures and code errors are not really the same issues.
- We need to have infrastructure logger and code.
- We need to catch the problem of having domain failures with rich expressivity without using exception.

## Decision

Create Result class that is a specialization of a monade to describe success and failures.
This class will contains a gobal logger.
This class should be build time as possible using meta programation.

## Consequences

We need to use `Result<Sucess, Failures...>` as return type of domain functions if the method can fail.