mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-10-23 04:51:59 +00:00
Add some errors
This commit is contained in:
parent
c0a06eeeab
commit
bc7c1b8946
1 changed files with 7 additions and 5 deletions
|
|
@ -359,9 +359,11 @@ export class App {
|
|||
}
|
||||
return servers;
|
||||
} catch (error) {
|
||||
// TODO: show error to user, handle expired token.
|
||||
// TODO(fortuna): Handle expired token.
|
||||
this.appRoot.showError(this.appRoot.localize('error-do-account-info'));
|
||||
console.error('Failed to load DigitalOcean Account:', error);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
private async loadManualServers() {
|
||||
|
|
@ -409,7 +411,8 @@ export class App {
|
|||
// User clicked "Cancel" on the loading screen.
|
||||
return;
|
||||
}
|
||||
console.log(error);
|
||||
console.log('Server creation failed', error);
|
||||
this.appRoot.showError(this.appRoot.localize('error-server-creation'));
|
||||
}
|
||||
}
|
||||
await this.updateServerView(server);
|
||||
|
|
@ -451,7 +454,6 @@ export class App {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
const doSession = this.createDigitalOceanSession(accessToken);
|
||||
const authEvents = new EventEmitter();
|
||||
let cancelled = false;
|
||||
|
|
@ -606,7 +608,7 @@ export class App {
|
|||
|
||||
// Opens the screen to create a server.
|
||||
private showDigitalOceanCreateServer() {
|
||||
// TODO: Should validate account here.
|
||||
// TODO(fortuna): Should validate account here.
|
||||
this.enterDigitalOceanMode();
|
||||
|
||||
const regionPicker = this.appRoot.getAndShowRegionPicker();
|
||||
|
|
@ -640,7 +642,7 @@ export class App {
|
|||
await this.showServer(server);
|
||||
} catch (error) {
|
||||
console.error('Error from createDigitalOceanServer', error);
|
||||
// TODO: Add error notification
|
||||
this.appRoot.showError(this.appRoot.localize('error-server-creation'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue