# server

Laurent Thiebaud

03/04/2024, 3:13 PM
Hi folks, in which cases would you recommend to use arrow-kt typed errors for a web application? Context: in the web application I'm working on, almost every method on any layer (except DB layer) returns a Either, which forces us to map errors, or to use for comprehension. This looks good in some cases, but when a method cannot throw an exception, it looks over-complicated Are there you some cases where that helps / some other where it is too much?

Emil Kantis

03/04/2024, 3:35 PM
I think the question is more suited for #arrow. I also asked a very similar thing there a while back. Perhaps it contains at least some useful thought for you.

Laurent Thiebaud

03/04/2024, 3:39 PM
Cool thx!


03/04/2024, 9:32 PM
Not an arrow fan. I build my web layer to only throw from a custom set of exceptions that my global exception handler can map to appropriate responses
👍 1