Skip to content
Snippets Groups Projects
Commit d77a3b2b authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: log error response body if present

parent db1c33bb
No related branches found
No related tags found
No related merge requests found
...@@ -59,8 +59,12 @@ async function handleError(config, err) { ...@@ -59,8 +59,12 @@ async function handleError(config, err) {
} }
// Swallow this error so that other repositories can be processed // Swallow this error so that other repositories can be processed
logger.error( logger.error(
{ err, message: err.message }, {
`Repository has unknown error:\n${stringify(err, null, 2)}` err,
message: err.message,
body: err.response ? err.response.body : undefined,
},
`Repository has unknown error`
); );
// delete branchList to avoid cleaning up branches // delete branchList to avoid cleaning up branches
delete config.branchList; // eslint-disable-line no-param-reassign delete config.branchList; // eslint-disable-line no-param-reassign
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment