Skip to content

Commit

Permalink
MDL-58310 message: No longer need to supress errors from messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
John Okely committed Jun 19, 2017
1 parent 6bb80a1 commit 46f68f0
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion message/amd/build/message_repository.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions message/amd/src/message_repository.js
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
* @copyright 2016 Ryan Wyllie <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/ajax', 'core/notification', 'core/log'], function($, Ajax, Notification, Log) {
define(['jquery', 'core/ajax', 'core/notification'], function($, Ajax, Notification) {
/**
* Retrieve a list of messages from the server.
*
@@ -72,9 +72,7 @@ define(['jquery', 'core/ajax', 'core/notification', 'core/log'], function($, Aja

var promise = Ajax.call([request])[0];

promise.fail(function(e) {
Log.error('Could not retrieve unread message count: ' + e.message);
});
promise.fail(Notification.exception);

return promise;
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions message/output/popup/amd/src/notification_repository.js
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
* @copyright 2016 Ryan Wyllie <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['core/ajax', 'core/notification', 'core/log'], function(Ajax, Notification, Log) {
define(['core/ajax', 'core/notification'], function(Ajax, Notification) {
/**
* Retrieve a list of notifications from the server.
*
@@ -64,9 +64,7 @@ define(['core/ajax', 'core/notification', 'core/log'], function(Ajax, Notificati

var promise = Ajax.call([request])[0];

promise.fail(function(e) {
Log.error('Could not retrieve notifications count: ' + e.message);
});
promise.fail(Notification.exception);

return promise;
};

0 comments on commit 46f68f0

Please sign in to comment.