MCPcopy
hub / github.com/coder/mux / throwPushFailure

Method throwPushFailure

src/node/runtime/SSHRuntime.ts:2170–2180  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

2168 }
2169 };
2170 const throwPushFailure = (error: unknown): never => {
2171 const errorMsg = getErrorMessage(error);
2172 const exitCode = (error as { code?: number | null }).code ?? null;
2173 const isConnectionFailure =
2174 (exitCode != null && this.transport.isConnectionFailure(exitCode, errorMsg)) ||
2175 isGitPushTransportFailure(exitCode, errorMsg);
2176 if (isConnectionFailure) {
2177 sshConnectionPool.reportFailure(this.transport.getConfig(), truncateSSHError(errorMsg));
2178 }
2179 throw new Error(`Failed to push to remote: ${errorMsg}`);
2180 };
2181 // `--no-thin` flag is positioned before the URL so it applies to the
2182 // pack-objects step git invokes for this push (and to nothing else).
2183 const noThinFlag = forceNoThin ? ["--no-thin"] : [];

Callers

nothing calls this directly

Calls 6

getErrorMessageFunction · 0.90
truncateSSHErrorFunction · 0.85
isConnectionFailureMethod · 0.65
getConfigMethod · 0.65
reportFailureMethod · 0.45

Tested by

no test coverage detected