Improve error message
This commit is contained in:
parent
5bc1903677
commit
869f2ac322
@ -5,7 +5,7 @@ const queryUtils = require('../../../utils/query-utils');
|
||||
const MISSING_AGGREGATION_COLUMNS = 'Missing columns in the aggregation. The map-config defines cartocss expressions,'+
|
||||
' interactivity fields or attributes that are not present in the aggregation';
|
||||
const unsupportedGeometryTypeErrorMessage = ctx =>
|
||||
`Unsupported geometry type (${ctx.geometryType}) for aggregation. Aggregation is available only for points.`;
|
||||
`Unsupported geometry type: ${ctx.geometryType}. Aggregation is available only for geometry type: ST_Point`;
|
||||
|
||||
module.exports = class AggregationMapConfigAdapter {
|
||||
constructor (pgConnection) {
|
||||
|
@ -379,13 +379,13 @@ describe('aggregation', function () {
|
||||
|
||||
assert.deepEqual(body, {
|
||||
errors: [
|
||||
'Unsupported geometry type (ST_Polygon) for aggregation.' +
|
||||
' Aggregation is available only for points.'
|
||||
'Unsupported geometry type: ST_Polygon.' +
|
||||
' Aggregation is available only for geometry type: ST_Point'
|
||||
],
|
||||
errors_with_context:[{
|
||||
type: 'unknown',
|
||||
message: 'Unsupported geometry type (ST_Polygon) for aggregation.' +
|
||||
' Aggregation is available only for points.'
|
||||
message: 'Unsupported geometry type: ST_Polygon.' +
|
||||
' Aggregation is available only for geometry type: ST_Point'
|
||||
}]
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user