Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
0 answers
31 views

Error handling in express without middlewares and using class structure

This is a simple implementation of Django's sample project "Poll" using and express. The controller code: ...
E.ss's user avatar
  • 21
4 votes
1 answer
1k views

Node.js http retry do while mechanism

I have implemented a simple do/while loop to handle a http request to a third-party. I don’t know when the data I receive will have elements in its array so I retry up to 10 times until the array ...
user195155's user avatar
0 votes
2 answers
1k views

Node.js error handling using merely if else without try catch

I'm confused why you need to use try catch. I made a simply utils like this, and use it on my models' callback. in my utils/error.js ...
alex johanson's user avatar
3 votes
1 answer
8k views

Mongoose promise & error handling

I search for rails-like way of writing NodeJS code and it's more then hard to find the right way. The code quickly become bloated and unreadable. I would like my code to be as clean as possible. ...
xpepermint's user avatar