Skip to content

Commit

Permalink
Defensive prop reading
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Nov 14, 2021
1 parent cd77539 commit 56033ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugin/github/GitHub.js
Expand Up @@ -22,7 +22,7 @@ const parseErrormsg = err => {
let msg = err;
if (err instanceof Error) {
const { status, message } = err;
const { headers } = err.response;
const headers = err.response ? err.response.headers : {};
msg = `${_.get(headers, 'status', status)} (${message})`;
}
return msg;
Expand Down

0 comments on commit 56033ca

Please sign in to comment.