diff --git a/client/src/templates/Challenges/redux/execute-challenge-saga.js b/client/src/templates/Challenges/redux/execute-challenge-saga.js index 028e84ea90..1b28f64752 100644 --- a/client/src/templates/Challenges/redux/execute-challenge-saga.js +++ b/client/src/templates/Challenges/redux/execute-challenge-saga.js @@ -225,10 +225,10 @@ function* previewChallengeSaga({ flushLogs = true } = {}) { } } } catch (err) { - if (err === 'timeout') { + if (err[0] === 'timeout') { // TODO: translate the error // eslint-disable-next-line no-ex-assign - err = `The code you have written is taking longer than the ${previewTimeout}ms our challenges allow. You may have created an infinite loop or need to write a more efficient algorithm`; + err[0] = `The code you have written is taking longer than the ${previewTimeout}ms our challenges allow. You may have created an infinite loop or need to write a more efficient algorithm`; } console.log(err); yield put(updateConsole(escape(err)));