Error messages in git.ts mislabel connection test failures as repository creation failures #14
Labels
No labels
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
blocked:verify-failed
bug
feature-request
quickfix
security/high
security/medium
test-coverage
triage-approved
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/GSD2_agent#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low (misleading error messages)
File:
src/lib/git.tsIssues:
In
testGitHubConnection(line 52), the catch block says:return { success: false, error: \Could not create repository: ...` }`This function tests the connection, not creates a repository — the error message is wrong.
Same pattern in
pushFilesToGitHub(line 128) — also says "Could not create repository" when it should say "Failed to push files".Fix: Correct the error messages to accurately describe what was happening when the error occurred.
This issue was already fixed in a subsequent commit. All 4 mislabeled error messages in
src/lib/git.tsnow correctly describe their context:testGitHubConnectioncatch: "Failed to connect to GitHub" (was "Could not create repository")pushFilesToGitHubcatch: "Failed to push files" (was "Could not create repository")testForgejoConnectioncatch: "Failed to connect to Forgejo" (was "Could not create repository")pushFilesToForgejocatch: "Failed to push files" (was "Could not create repository")The 2 remaining "Could not create repository" messages are in
createGitHubRepoandcreateForgejoRepowhere they are correct. No code changes needed.