Merge pull request #555 from Algunenano/cancel_timeout

Consider cancelled queries as platform limits
This commit is contained in:
Raúl Marín 2019-01-03 15:26:15 +01:00 committed by GitHub
commit bef3568f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Released 2018-mm-dd
Announcements:
* Update docs: compatible Node.js and npm versions
* Set platform limits message also on streaming responses
* Consider cancelled queries as platform limits.
## 2.3.1

View File

@ -14,7 +14,8 @@ module.exports = function ErrorHandlerFactory (err) {
function isTimeoutError(err) {
return err.message && (
err.message.indexOf('statement timeout') > -1 ||
err.message.indexOf('RuntimeError: Execution of function interrupted by signal') > -1
err.message.indexOf('RuntimeError: Execution of function interrupted by signal') > -1 ||
err.message.indexOf('canceling statement due to user request') > -1
);
}