Merge "Reduce code duplication in MessageCache"
[lhc/web/wiklou.git] / resources / src / mediawiki.special / mediawiki.special.apisandbox.js
index a2d106d..3cfc52c 100644 (file)
                                                return xhr;
                                        }
                                } )
+                                       .then( null, function ( code, data, result, jqXHR ) {
+                                               if ( code !== 'http' ) {
+                                                       // Not really an error, work around mw.Api thinking it is.
+                                                       return $.Deferred()
+                                                               .resolve( result, jqXHR )
+                                                               .promise();
+                                               }
+                                               return this;
+                                       } )
                                        .fail( function ( code, data ) {
                                                var details = 'HTTP error: ' + data.exception;
                                                $result.empty()