mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-15 12:39:28 +08:00
fix(long-connection): Throw error for reporting, instead of just logging
This commit is contained in:
parent
5f8bb9dffd
commit
6eea9d26f1
1 changed files with 1 additions and 2 deletions
|
@ -112,8 +112,7 @@ class NylasLongConnection {
|
||||||
const accountToken = this._api.accessTokenForAccountId(this._accountId)
|
const accountToken = this._api.accessTokenForAccountId(this._accountId)
|
||||||
const identityToken = (IdentityStore.identity() || {}).token || ''
|
const identityToken = (IdentityStore.identity() || {}).token || ''
|
||||||
if (!accountToken) {
|
if (!accountToken) {
|
||||||
console.error(`Can't establish NylasLongConnection: No account token available for account ${this._accountId}`)
|
throw new Error(`Can't establish NylasLongConnection: No account token available for account ${this._accountId}`)
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = url.parse(`${this._api.APIRoot}${this._path}`)
|
const options = url.parse(`${this._api.APIRoot}${this._path}`)
|
||||||
|
|
Loading…
Reference in a new issue