summaryrefslogtreecommitdiffhomepage
path: root/app/lib
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/backend.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js
index 3eb0614664..8a3b8d16d0 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -450,14 +450,13 @@ export class Backend {
}
}
- _authenticate(sharedSecret: string): Promise<void> {
- return this._ipc.authenticate(sharedSecret)
- .then(() => {
- log.info('Authenticated with backend');
- })
- .catch((e) => {
- log.error('Failed to authenticate with backend: ', e.message);
- throw e;
- });
+ async _authenticate(sharedSecret: string): Promise<void> {
+ try {
+ await this._ipc.authenticate(sharedSecret);
+ log.info('Authenticated with backend');
+ } catch (e) {
+ log.error('Failed to authenticate with backend: ', e.message);
+ throw e;
+ }
}
}