Tobias
Member since Feb 28, 2022
- Profile: /members/14541-tobias.htm
- Comments: 2
Recent Blog Comments By Tobias
-
You Can throw() Anything In JavaScript - And Other async/await Considerations
Posted on Feb 28, 2022 at 2:42 PM
@Ben, No, you are totally right with your analysis. I'm just saying that your two examples are not equivalent. In your async function makeRequest you have a huge try-catch block. The line throw( this.normalizeError( data ) ); is inside the "try" block. Hence, it will get... read more »
-
You Can throw() Anything In JavaScript - And Other async/await Considerations
Posted on Feb 28, 2022 at 1:04 PM
Hi Ben, in your transformed example, the inner error ( normalizeError ) will always be catched and turned into an outer error ( normalizeTransportError ). This is a huge difference to your original example where you return rejected promises. ;-) Cheers, Tobias... read more »