Browse Source

More reliably check for directory-not-found errors.

Ian Rose 6 years ago
parent
commit
39ce4e1d25
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/filebrowser/src/model.ts

+ 1 - 1
packages/filebrowser/src/model.ts

@@ -291,7 +291,7 @@ export class FileBrowserModel implements IDisposable {
       })
       .catch(error => {
         this._pendingPath = null;
-        if (error.message === 'Not Found') {
+        if (error.response && error.response.status === 404) {
           error.message = `Directory not found: "${this._model.path}"`;
           console.error(error);
           this._connectionFailure.emit(error);