sergey.trufanov
09/02/2019, 5:30 PMdata
, domain
, presentation
) is responsible for handling API errors, for example if I have API method /login
and it returns error Email is incorrect
where should I handle it? I guess in repository inside data
module/layer, but maybe I missed smth.henrikhorbovyi
09/03/2019, 12:13 AMpresentation
layer, and presentation
will only comsume those exceptions coming from domain
and show it for the user in someway.
(I'm not sure if my thoughts are correct. 😄 Just sharing my option)
Anyway, I'm curious about other point of view 🙂rkeazor
09/03/2019, 12:04 PMnounours
09/03/2019, 1:12 PMsergey.trufanov
09/03/2019, 2:04 PMdomain
, agree with @nounoursghedeon
09/13/2019, 7:04 AMdata
and optionally in domain, no? You don't want api exeptions in domain
because that's dependency leak. You handle it once in data
, map it to some sort of error model from domain. Then, in domain
itself you can do something with it, or just pass it to ui
and ui
will map it to its own models.