News for hackers. Stuff that matters.
Re:JEP draft: Exception handling in switch by bedobi on Monday April 22, 2024 @04:32PM (#40119914)
Good poit re using MyError, that is indeed what I meant in the Either case

Not sure what you mean by callback hell, I've never experienced that using Either. I just pass the Either from the db layer or whatever to the resource layer or whatever, where I fold it into a 200 with the requested thing or a 4xx or 5xx or whatever depending on the MyError (which is usually a sealed class that lists everything that can go wrong with the thing)

There are no comments on this comment yet.