String comparison and regex to match errors instead of indexOf

This commit is contained in:
Raul Ochoa
2017-08-10 16:06:10 +02:00
parent 23edf78a67
commit 69eaa72819
+2 -2
View File
@@ -301,11 +301,11 @@ function statusFromErrorMessage(errMsg) {
}
function isRenderTimeoutError (err) {
return err.message && (-1 !== err.message.indexOf('Render timed out'));
return err.message === 'Render timed out';
}
function isDatasourceTimeoutError (err) {
return err.message && (-1 !== err.message.indexOf('canceling statement due to statement timeout'));
return err.message && err.message.match(/canceling statement due to statement timeout/i);
}
function isTimeoutError (err) {