The Promise executor function should not be async. Though this works, if the executor functions throws an error, the error will be lost and wont cause newly created promise function to reject. This will make it difficult to debug and handle some errors
The Promise executor function should not be async. Though this works, if the executor functions throws an error, the error will be lost and wont cause newly created promise function to reject. This will make it difficult to debug and handle some errors