Skip to content
Snippets Groups Projects
Unverified Commit 42f6c5b2 authored by Maksim's avatar Maksim Committed by GitHub
Browse files

fix(bitbucket-server): handle push rejection properly (#11154)

parent 98ee4a56
No related branches found
No related tags found
No related merge requests found
......@@ -837,6 +837,15 @@ export async function commitFiles({
error.validationMessage = `Renovate cannot push to its branch because branch protection has been enabled.`;
throw error;
}
if (err.message.includes('can only push your own commits')) {
const error = new Error(CONFIG_VALIDATION);
error.validationSource = branchName;
error.validationError = 'Bitbucket committer error';
error.validationMessage = `Renovate has experienced the following error when attempting to push its branch to the server: "${String(
err.message
)}"`;
throw error;
}
if (err.message.includes('remote: error: cannot lock ref')) {
logger.error({ err }, 'Error committing files.');
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment