fix db limit error message set order
This commit is contained in:
@@ -56,13 +56,15 @@ function populateTimeoutErrors (errors) {
|
||||
error.subtype = 'render';
|
||||
}
|
||||
|
||||
const IS_DATASOURCE_TIMEOUT_ERROR = isDatasourceTimeoutError(error);
|
||||
|
||||
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)) {
|
||||
if (IS_DATASOURCE_TIMEOUT_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.';
|
||||
|
||||
Reference in New Issue
Block a user