Improve error
This commit is contained in:
@@ -30,7 +30,10 @@ DataviewBackend.prototype.getDataview = function (mapConfigProvider, user, param
|
||||
|
||||
var dataviewDefinition = getDataviewDefinition(mapConfig.obj(), dataviewName);
|
||||
if (!dataviewDefinition) {
|
||||
return callback(new Error("Dataview '" + dataviewName + "' does not exists"));
|
||||
const error = new Error(`Dataview '${dataviewName}' does not exists`);
|
||||
error.type = 'dataview';
|
||||
error.http_status = 400;
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
var ownFilter = +params.own_filter;
|
||||
|
||||
Reference in New Issue
Block a user