diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-06 13:42:18 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-06 13:42:18 +0100 |
commit | 66d03aae98cc0429d2ed75eac68025f447868479 (patch) | |
tree | 859cef0576726f1ecd7a6c0d4bc14c560ebe4f84 /app/assets/javascripts/droplab/plugins | |
parent | 98f59fc20fdab2e4d0f8f06d615abb3922d766cb (diff) | |
download | gitlab-ce-66d03aae98cc0429d2ed75eac68025f447868479.tar.gz |
Fixed error handling
Diffstat (limited to 'app/assets/javascripts/droplab/plugins')
-rw-r--r-- | app/assets/javascripts/droplab/plugins/ajax.js | 8 | ||||
-rw-r--r-- | app/assets/javascripts/droplab/plugins/ajax_filter.js | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/app/assets/javascripts/droplab/plugins/ajax.js b/app/assets/javascripts/droplab/plugins/ajax.js index f08b638fc62..12afe53ed76 100644 --- a/app/assets/javascripts/droplab/plugins/ajax.js +++ b/app/assets/javascripts/droplab/plugins/ajax.js @@ -1,9 +1,5 @@ /* eslint-disable */ -function droplabAjaxException(message) { - this.message = message; -} - const Ajax = { _loadUrlData: function _loadUrlData(url) { var self = this; @@ -58,9 +54,7 @@ const Ajax = { this._loadUrlData(config.endpoint) .then(function(d) { self._loadData(d, config, self); - }, config.onError).catch(function(e) { - throw new droplabAjaxException(e.message || e); - }); + }, config.onError).catch(config.onError); } }, destroy: function() { diff --git a/app/assets/javascripts/droplab/plugins/ajax_filter.js b/app/assets/javascripts/droplab/plugins/ajax_filter.js index 7fe221e101f..cfd7e2ca189 100644 --- a/app/assets/javascripts/droplab/plugins/ajax_filter.js +++ b/app/assets/javascripts/droplab/plugins/ajax_filter.js @@ -68,7 +68,7 @@ const AjaxFilter = { this._loadUrlData(url) .then(function(data) { self._loadData(data, config, self); - }, config.onError); + }, config.onError).catch(config.onError); } }, |