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

fix(gitFs): catch and throw ssh error

parent 65880e39
No related branches found
No related tags found
No related merge requests found
......@@ -306,6 +306,15 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
logger.debug('Throwing bad credentials');
throw new Error('bad-credentials');
}
if (
err.message &&
err.message.startsWith(
'ssh_exchange_identification: Connection closed by remote host'
)
) {
logger.debug('Throwing bad credentials');
throw new Error('bad-credentials');
}
if (err.message === 'bad-credentials') {
logger.debug('Passing bad-credentials error up');
throw err;
......
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