Merge pull request #555 from Algunenano/cancel_timeout
Consider cancelled queries as platform limits
This commit is contained in:
commit
bef3568f0c
1
NEWS.md
1
NEWS.md
@ -8,6 +8,7 @@ Released 2018-mm-dd
|
|||||||
Announcements:
|
Announcements:
|
||||||
* Update docs: compatible Node.js and npm versions
|
* Update docs: compatible Node.js and npm versions
|
||||||
* Set platform limits message also on streaming responses
|
* Set platform limits message also on streaming responses
|
||||||
|
* Consider cancelled queries as platform limits.
|
||||||
|
|
||||||
|
|
||||||
## 2.3.1
|
## 2.3.1
|
||||||
|
@ -14,7 +14,8 @@ module.exports = function ErrorHandlerFactory (err) {
|
|||||||
function isTimeoutError(err) {
|
function isTimeoutError(err) {
|
||||||
return err.message && (
|
return err.message && (
|
||||||
err.message.indexOf('statement timeout') > -1 ||
|
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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user