+ if (result && result.statusCode === 401) return logout();
+ if (result && result.statusCode === 403) {
+ app.createDirectoryError = 'Name not allowed';
+ return;
+ }
+ if (result && result.statusCode === 409) {
+ app.createDirectoryError = 'Directory already exists';
+ return;
+ }
+ if (result && result.statusCode !== 201) return console.error('Error creating directory: ', result.statusCode);