fix(client): show error messages instead of timeout (#43744)
* Fixed Error message update not displaying when timeout happens when there was an error in the code. Working on fixing the timeout it self. * refactor: remove comment + log changes Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@ -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)));
|
||||
|
Reference in New Issue
Block a user