File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,9 @@ angular
531531 } ) ;
532532
533533 iframe . bind ( 'load' , function ( ) {
534+ var html = '' ;
535+ var status = 200 ;
536+
534537 try {
535538 // Fix for legacy IE browsers that loads internal error page
536539 // when failed WS response received. In consequence iframe
@@ -544,10 +547,14 @@ angular
544547 // returning response via same 'success' event handler.
545548
546549 // fixed angular.contents() for iframes
547- var html = iframe [ 0 ] . contentDocument . body . innerHTML ;
548- } catch ( e ) { }
550+ html = iframe [ 0 ] . contentDocument . body . innerHTML ;
551+ } catch ( e ) {
552+ // in case we run into the access-is-denied error or we have another error on the server side
553+ // (intentional 500,40... errors), we at least say 'something went wrong' -> 500
554+ status = 500 ;
555+ }
549556
550- var xhr = { response : html , status : 200 , dummy : true } ;
557+ var xhr = { response : html , status : status , dummy : true } ;
551558 var headers = { } ;
552559 var response = that . _transformResponse ( xhr . response , headers ) ;
553560
You can’t perform that action at this time.
0 commit comments