Unverified Commit c5976659 authored by Bradley Hilton's avatar Bradley Hilton Committed by GitHub

Ensure the error messages are printed instead of other errors

Co-Authored-By: default avatarAaron Ogle <geekgonecrazy@users.noreply.github.com>
parent bc39036e
......@@ -121,8 +121,9 @@ export class CloudAuth {
return tokenInfo;
} catch (err) {
const d = err.response.data;
// tslint:disable-next-line:no-console
console.log(`[${ err.res.statusCode }] error getting token: ${ err.data.error } (${ err.data.requestId })`);
console.log(`[${ err.response.statusCode }] error getting token: ${ d.error } (${ d.requestId })`);
throw err;
}
......@@ -152,9 +153,9 @@ export class CloudAuth {
this.config.set('rcc.token.token_type', tokenInfo.token_type);
this.config.set('rcc.expiresAt', expiresAt);
} catch (err) {
const d = err.data;
const d = err.response.data;
// tslint:disable-next-line:no-console
console.log(`[${ err.res.statusCode }] error getting token refreshed: ${ d.error } (${ d.requestId })`);
console.log(`[${ err.response.statusCode }] error getting token refreshed: ${ d.error } (${ d.requestId })`);
throw err;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment