Giovanni Benussi
1 min readFeb 26, 2018

--

Hi David, I like your approach of have separate classes for success and failure responses. Besides that both works the same way (have #success? and #failure? methods and data attached to them, like errors or error_messages for example), it seems better as you said to have a specialized class to which we can have enough confidence to know that they will respond the way they are supposed to.

At the end, the important thing is to be able to interact in a better and predictable way within our application layers.

Regards!

--

--

Giovanni Benussi
Giovanni Benussi

Written by Giovanni Benussi

Frontend Developer 👨‍💻 Follow me on Twitter 🐦 https://twitter.com/giovannibenussi

No responses yet