File tree 2 files changed +10
-2
lines changed
client/directives/activePanel/tabs/editor
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ function fileEditor(
11
11
debounce ,
12
12
errs ,
13
13
keypather ,
14
- hasKeypaths ,
15
14
modelist ,
16
15
promisify ,
17
16
loadingPromises
@@ -61,7 +60,11 @@ function fileEditor(
61
60
return promisify ( $scope . file , 'fetch' ) ( )
62
61
. then ( resetFileBodyState )
63
62
. catch ( function ( error ) {
64
- $scope . hasError = 'failure' ;
63
+ if ( keypather . get ( error , 'data.res.statusCode' ) === 413 ) {
64
+ $scope . hasError = 'tooLarge' ;
65
+ } else {
66
+ $scope . hasError = 'failure' ;
67
+ }
65
68
errs . report ( error ) ;
66
69
} )
67
70
. finally ( function ( ) {
Original file line number Diff line number Diff line change 9
9
)
10
10
p.p We're Sorry, but your file is in another castle… and that castle just blew up! 😱
11
11
12
+ .blank-panel (
13
+ ng-if = "!loading && hasError === 'tooLarge'"
14
+ )
15
+ p.p The requested file is too large to load.
16
+
12
17
.pre (
13
18
lazy-load = "ui.ace"
14
19
ng-if = "!hasError && file.attrs.fileType !== 'ssh'"
You can’t perform that action at this time.
0 commit comments