Merge pull request #514 from CartoDB/984-sql-timeout-error-message
Improve sql timeout error message
This commit is contained in:
commit
6897101797
2
NEWS.md
2
NEWS.md
@ -3,6 +3,8 @@
|
||||
## 2.1.1
|
||||
Released 2018-mm-dd
|
||||
|
||||
Announcements:
|
||||
* Improve error message when the DB query is over the user's limits
|
||||
|
||||
## 2.1.0
|
||||
Released 2018-06-13
|
||||
|
@ -18,7 +18,8 @@ function isTimeoutError(err) {
|
||||
|
||||
function createTimeoutError() {
|
||||
return new ErrorHandler({
|
||||
message: 'You are over platform\'s limits. Please contact us to know more details',
|
||||
message: 'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
context: 'limit',
|
||||
detail: 'datasource',
|
||||
http_status: 429
|
||||
|
@ -791,7 +791,8 @@ it('GET with callback must return 200 status error even if it is an error', func
|
||||
var error = JSON.parse(res.body);
|
||||
assert.deepEqual(error, {
|
||||
error: [
|
||||
'You are over platform\'s limits. Please contact us to know more details'
|
||||
'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
],
|
||||
context: 'limit',
|
||||
detail: 'datasource'
|
||||
@ -817,7 +818,8 @@ it('GET with callback must return 200 status error even if it is an error', func
|
||||
var error = JSON.parse(res.body);
|
||||
assert.deepEqual(error, {
|
||||
error: [
|
||||
'You are over platform\'s limits. Please contact us to know more details'
|
||||
'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
],
|
||||
context: 'limit',
|
||||
detail: 'datasource'
|
||||
|
@ -216,7 +216,8 @@ describe('copy-endpoints', function() {
|
||||
assert.ifError(err);
|
||||
assert.deepEqual(JSON.parse(res.body), {
|
||||
error: [
|
||||
'You are over platform\'s limits. Please contact us to know more details'
|
||||
'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
],
|
||||
context: 'limit',
|
||||
detail: 'datasource'
|
||||
@ -251,7 +252,8 @@ describe('copy-endpoints', function() {
|
||||
},{}, function(err, res) {
|
||||
assert.ifError(err);
|
||||
const error = {
|
||||
error:["You are over platform's limits. Please contact us to know more details"],
|
||||
error: ['You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',],
|
||||
context:"limit",
|
||||
detail:"datasource"
|
||||
};
|
||||
|
@ -98,7 +98,8 @@ describe('timeout', function () {
|
||||
|
||||
assert.deepEqual(res, {
|
||||
error: [
|
||||
'You are over platform\'s limits. Please contact us to know more details'
|
||||
'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
],
|
||||
context: 'limit',
|
||||
detail: 'datasource'
|
||||
@ -180,7 +181,8 @@ describe('timeout', function () {
|
||||
|
||||
assert.deepEqual(res, {
|
||||
error: [
|
||||
'You are over platform\'s limits. Please contact us to know more details'
|
||||
'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
],
|
||||
context: 'limit',
|
||||
detail: 'datasource'
|
||||
|
@ -44,7 +44,8 @@ describe('error-handler-factory', function () {
|
||||
const error = new Error('statement timeout');
|
||||
const errorHandler = errorHandlerFactory(error);
|
||||
const expectedError = new ErrorHandler({
|
||||
message: 'You are over platform\'s limits. Please contact us to know more details',
|
||||
message: 'You are over platform\'s limits: SQL query timeout error.' +
|
||||
' Refactor your query before running again or contact CARTO support for more details.',
|
||||
context: 'limit',
|
||||
detail: 'datasource',
|
||||
http_status: 429
|
||||
|
Loading…
Reference in New Issue
Block a user