String comparison and regex to match errors instead of indexOf
This commit is contained in:
parent
69eaa72819
commit
e7c206762d
@ -120,11 +120,11 @@ module.exports = function(serverOptions) {
|
||||
onTileErrorStrategy = function onTileErrorStrategy$TimeoutTile(err, tile, headers, stats, format, callback) {
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user