Require.js error handler