Skip to content

Commit a6a821a

Browse files
committed
fix: throw plain errors
1 parent 406e2af commit a6a821a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class HerokuAPIError extends CLIError {
2828

2929
constructor(httpError: HTTPError) {
3030
let options: IHerokuAPIErrorOptions = httpError.body
31-
if (!options.message) throw httpError
31+
if (!options || !options.message) throw httpError
3232
let info = []
3333
if (options.id) info.push(`Error ID: ${options.id}`)
3434
if (options.app && options.app.name) info.push(`App: ${options.app.name}`)

0 commit comments

Comments
 (0)