return function (err) {
        // if this error is not "404", rethrow
        if (!(err instanceof SavedObjectNotFound)) throw err;

        var url = mapping[err.savedObjectType] || mapping['*'];
        if (!url) url = '/';

        url = qs.replaceParamInUrl(url, 'notFound', err.savedObjectType);

        notify.error(err);
        kbnUrl.redirect(url);
        return Promise.halt();
      };
Example #2
0
 GlobalState.prototype.removeFromUrl = function (url) {
   return qs.replaceParamInUrl(url, this._urlParam, null);
 };