fix(middleware): fix WARN log when passing undefined error handler to promise.then
fix(middleware): fix WARN log when passing undefined error handler to promise.then

Closes #2227

wesleycho/karma,pedrotcaraujo/karma,maksimr/karma,david-garcia-nete/karma,karma-runner/karma,kahwee/karma,johnjbarton/karma,david-garcia-nete/karma,maksimr/karma,karma-runner/karma,johnjbarton/karma,johnjbarton/karma,pedrotcaraujo/karma,maksimr/karma,johnjbarton/karma,kahwee/karma,kahwee/karma,david-garcia-nete/karma,wesleycho/karma,kahwee/karma,karma-runner/karma,wesleycho/karma,pedrotcaraujo/karma,wesleycho/karma,karma-runner/karma,pedrotcaraujo/karma