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 {
435435 ( name : string ) => ! CONTROL_CHAR_REGEXP . test ( name )
436436 ) ;
437437 } 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+ ) {
441442 return [ ] ;
442443 }
443444 throw err ;
@@ -456,9 +457,10 @@ export class ShellInstanceState {
456457 ( name : string ) => ! CONTROL_CHAR_REGEXP . test ( name )
457458 ) ;
458459 } 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+ ) {
462464 return [ ] ;
463465 }
464466 throw err ;
You can’t perform that action at this time.
0 commit comments