Reputation: 411
Is there a difference in an express application between these 2 pieces of code that calls an error handler?
return next(err);
next(err); return;
Are they different or same and if different which one is correct/preferred?
Upvotes: 1
Views: 68
Reputation: 19607
next
doesn't return anything, so these two statements are identical.
But the first one is shorter.
Upvotes: 3