Skip to content
/ ErrorT Public

How to use Cats - XorT for error handling

Notifications You must be signed in to change notification settings

VLMH/ErrorT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ErrorT

How to use Cats - XorT for error handling

Problem

In our codebase, most functions are returning one of A, Option[A], Future[A] and Future[Option[A]].

With Option, when we get None, we cannot identify the error.

Therefore, we don't know which error code to return for Frontend.

Intention

  • use Xor to capture the error
  • use XorT to work with Future
  • avoiding comprehensive refactoring

About

How to use Cats - XorT for error handling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages