In case the code inside our unhandled rejection handler fails, it will throw another unhandled rejection and we may end up with infinite loop.
In this case try-catch the whole code inside the unhandled rejection and in case error is arised, exit the process. We cannot console.log the error as even this operation might fail.
In case the code inside our unhandled rejection handler fails, it will throw another unhandled rejection and we may end up with infinite loop. In this case try-catch the whole code inside the unhandled rejection and in case error is arised, exit the process. We cannot console.log the error as even this operation might fail.