From ee25585f06b23d3a288d0d46cd14b9454599626f Mon Sep 17 00:00:00 2001 From: Eneko Lakasta Date: Fri, 29 Jun 2018 15:01:12 +0200 Subject: [PATCH] add new error message --- lib/cartodb/api/middlewares/error-middleware.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cartodb/api/middlewares/error-middleware.js b/lib/cartodb/api/middlewares/error-middleware.js index c02974b4..74a7c701 100644 --- a/lib/cartodb/api/middlewares/error-middleware.js +++ b/lib/cartodb/api/middlewares/error-middleware.js @@ -56,16 +56,18 @@ function populateTimeoutErrors (errors) { error.subtype = 'render'; } - if (isDatasourceTimeoutError(error)) { - error.subtype = 'datasource'; - } - if (isTimeoutError(error)) { error.message = 'You are over platform\'s limits. Please contact us to know more details'; error.type = 'limit'; error.http_status = 429; } + if (isDatasourceTimeoutError(error)) { + error.subtype = 'datasource'; + error.message = 'You are over platform\'s limits: SQL query timeout error.' + + ' Refactor your query before running again or contact CARTO support for more details.'; + } + return error; }); }