All Questions
4 questions
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:
...
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 ...
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
...
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.
...