diff options
| -rw-r--r-- | app/lib/backend.js | 17 |
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; + } } } |
