File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8181 $ . ajax ( {
8282 url : OC . linkToOCS ( 'apps/notifications/api/v1' , 2 ) + 'notifications/' + id + '?format=json' ,
8383 type : 'DELETE' ,
84- success : function ( data ) {
84+ success : function ( ) {
8585 self . _removeNotification ( id ) ;
8686 } ,
8787 error : function ( ) {
206206 * @param {XMLHttpRequest } xhr
207207 */
208208 _onFetchError : function ( xhr ) {
209- if ( xhr . status === 404 ) {
210- // 404 Not Found - stop polling
211- this . _shutDownNotifications ( ) ;
209+ if ( xhr . status === 503 ) {
210+ // 503 - Maintenance mode
211+ console . debug ( 'Shutting down notifications: instance is in maintenance mode.' ) ;
212+ } else if ( xhr . status === 404 ) {
213+ // 404 - App disabled
214+ console . debug ( 'Shutting down notifications: app is disabled.' ) ;
212215 } else {
213- OC . Notification . showTemporary ( 'Failed to request notifications. Please try to refresh the page manually.' ) ;
216+ console . error ( 'Shutting down notifications: [' + xhr . status + '] ' + xhr . statusText ) ;
214217 }
218+ this . _shutDownNotifications ( ) ;
215219 } ,
216220
217221 /**
You can’t perform that action at this time.
0 commit comments