Skip to content

Commit 6192ae5

Browse files
committed
fix: prettify errors
1 parent 71235a8 commit 6192ae5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/login.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Netrc from 'netrc-parser'
66
import opn = require('opn')
77
import {hostname} from 'os'
88

9-
import {APIClient} from './api_client'
9+
import {APIClient, HerokuAPIError} from './api_client'
1010
import {vars} from './vars'
1111

1212
const debug = require('debug')('heroku-cli-command')
@@ -87,6 +87,8 @@ export class Login {
8787
ux.warn(err)
8888
}
8989
}
90+
} catch (err) {
91+
throw new HerokuAPIError(err)
9092
} finally {
9193
loggedIn = true
9294
}

0 commit comments

Comments
 (0)