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
531
531
} ) ;
532
532
533
533
iframe . bind ( 'load' , function ( ) {
534
+ var html = '' ;
535
+ var status = 200 ;
536
+
534
537
try {
535
538
// Fix for legacy IE browsers that loads internal error page
536
539
// when failed WS response received. In consequence iframe
@@ -544,10 +547,14 @@ angular
544
547
// returning response via same 'success' event handler.
545
548
546
549
// 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
+ }
549
556
550
- var xhr = { response : html , status : 200 , dummy : true } ;
557
+ var xhr = { response : html , status : status , dummy : true } ;
551
558
var headers = { } ;
552
559
var response = that . _transformResponse ( xhr . response , headers ) ;
553
560
You can’t perform that action at this time.
0 commit comments