Use error label as middleware argument
This commit is contained in:
parent
068c242148
commit
76da828168
@ -46,9 +46,9 @@ NamedMapsController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.prepareContext,
|
||||
this.getNamedMapProvider(),
|
||||
this.getNamedMapProvider('NAMED_MAP_TILE'),
|
||||
this.getAffectedTables(),
|
||||
this.getTile(),
|
||||
this.getTile('NAMED_MAP_TILE'),
|
||||
this.setSurrogateKey(),
|
||||
this.setCacheChannelHeader(),
|
||||
this.setLastModifiedHeader(),
|
||||
@ -177,7 +177,7 @@ NamedMapsController.prototype.prepareLayerFilterFromPreviewLayers = function (la
|
||||
}.bind(this);
|
||||
};
|
||||
|
||||
NamedMapsController.prototype.getTile = function () {
|
||||
NamedMapsController.prototype.getTile = function (label) {
|
||||
return function getTileMiddleware (req, res, next) {
|
||||
const { namedMapProvider } = res.locals;
|
||||
|
||||
@ -185,7 +185,7 @@ NamedMapsController.prototype.getTile = function () {
|
||||
req.profiler.add(stats);
|
||||
|
||||
if (err) {
|
||||
err.label = 'NAMED_MAP_TILE';
|
||||
err.label = label;
|
||||
return next(err);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user