File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -435,9 +435,10 @@ export class ShellInstanceState {
435
435
( name : string ) => ! CONTROL_CHAR_REGEXP . test ( name )
436
436
) ;
437
437
} catch ( err : any ) {
438
- // TODO: move this code to a method in the shell instance so we don't
439
- // have to hardcode the error code or export it.
440
- if ( err ?. code === 'SHAPI-10004' || err ?. codeName === 'Unauthorized' ) {
438
+ if (
439
+ err ?. code === ShellApiErrors . NotConnected ||
440
+ err ?. codeName === 'Unauthorized'
441
+ ) {
441
442
return [ ] ;
442
443
}
443
444
throw err ;
@@ -456,9 +457,10 @@ export class ShellInstanceState {
456
457
( name : string ) => ! CONTROL_CHAR_REGEXP . test ( name )
457
458
) ;
458
459
} catch ( err : any ) {
459
- // TODO: move this code to a method in the shell instance so we don't
460
- // have to hardcode the error code or export it.
461
- if ( err ?. code === 'SHAPI-10004' || err ?. codeName === 'Unauthorized' ) {
460
+ if (
461
+ err ?. code === ShellApiErrors . NotConnected ||
462
+ err ?. codeName === 'Unauthorized'
463
+ ) {
462
464
return [ ] ;
463
465
}
464
466
throw err ;
You can’t perform that action at this time.
0 commit comments