where to handle error ? Model or Controller

31 views
Skip to first unread message

Yu Zhou

unread,
Jun 25, 2014, 11:34:44 PM6/25/14
to nod...@googlegroups.com
Hi All,

I am new to mean stack. Currently, I am using mean io as my nodeJS application framework. While developing, I am wondering where I should handle errors ? In Model or in controller ?

Can anyone help me ?

Thanks !

greelgorke

unread,
Jun 26, 2014, 3:14:26 AM6/26/14
to nod...@googlegroups.com
there is not 'or'. handle errors there, where they can be handled. sometimes to handle an error can mean to transform and throw a new one. sometime it is just catch and retry. sometimes it's an error page. it deppends.
Reply all
Reply to author
Forward
0 new messages