Use 429 to indicate timeout errors

This commit is contained in:
Daniel García Aubert
2017-07-31 19:08:29 +02:00
parent bb59902535
commit 5974413d5c
3 changed files with 16 additions and 9 deletions
+7
View File
@@ -301,5 +301,12 @@ function statusFromErrorMessage(errMsg) {
statusCode = 404;
}
}
else if ( -1 !== errMsg.indexOf('Render timed out') ) {
statusCode = 429; // under discussion
}
else if ( -1 !== errMsg.indexOf('canceling statement due to statement timeout') ) {
statusCode = 429; // under discussion
}
return statusCode;
}