Tag: javascript

  • Broken Promises

    Let’s start here: Promise.resolve( ‘hi’ ).then( showHappy ).catch( showError ) This is a super common form you see with Promises, but is has a subtle problem. What happens if your then callback throws? Arg! My catch caught the error! Because of how promises chain, this is expected, but often surprising. If your catch is written […]