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

refactor(gitlab): don’t warn for status transition errors

parent 3edd582b
Branches
Tags
No related merge requests found
...@@ -383,8 +383,17 @@ async function setBranchStatus( ...@@ -383,8 +383,17 @@ async function setBranchStatus(
try { try {
await get.post(url, { body: options }); await get.post(url, { body: options });
} catch (err) /* istanbul ignore next */ { } catch (err) /* istanbul ignore next */ {
logger.debug({ err }); if (
logger.warn('Failed to set branch status'); err.message &&
err.messages.startsWith(
'Cannot transition status via :enqueue from :pending'
)
) {
logger.info('Ignoring status transition error');
} else {
logger.debug({ err });
logger.warn('Failed to set branch status');
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment