From 8bfed9ca687100cd738d1e22635661ff4c11eeba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20de=20Sousa=20Costa=20Filho?= Date: Wed, 4 Oct 2023 10:35:16 -0300 Subject: [PATCH] Update README.md --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2ccdc8a..9e5820f 100644 --- a/README.md +++ b/README.md @@ -189,11 +189,14 @@ class UsersController < BaseController end ``` -### Types precedence - -FService matches types from left to right, from more specific to more generic. -Example (:unprocessable_entity, :client_error, :http_response) -Then, result will match first :unprocessable_entity, after :client_error, after :http_response, then not matched. +### Type precedence + +FService matches the service's types from left to right, from more specific to more generic. +For example, the following result `Failure(:unprocessable_entity, :client_error, :http_response)` will match in the following order: +1. `:unprocessable_entity`; +2. `:client_error`; +3. `:http_response`; +4. unmatched block; ### Chaining services