Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Frontend/src/scripts/features/branches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ export function bindBranchUI() {
notify(`Switched to ${name}`);
await renderList(); // higher-level refresh
await runHook('postSwitchBranch', hookData);
} catch {
notify('Checkout failed');
} catch (err) {
const details = err instanceof Error ? err.message : String(err);
notify(`Checkout failed: ${details}`);
}
}

Expand Down Expand Up @@ -218,7 +219,7 @@ export function bindBranchUI() {
notify(`Merged branch '${name}' into '${cur}'`);
await Promise.allSettled([renderList(), loadBranches()]);
} catch (e) {
const msg = String(e || '');
const msg = String(e);
const looksLikeConflict =
/CONFLICT/i.test(msg) ||
/Automatic merge failed/i.test(msg) ||
Expand Down Expand Up @@ -269,7 +270,7 @@ export function bindBranchUI() {
await loadBranches();
await runHook('postBranchDelete', hookData);
} catch (e) {
const msg = String(e || '');
const msg = String(e);
if (wantForce) { notify(`Force delete failed${msg ? `: ${msg}` : ''}`); return; }
// If not fully merged, offer force delete as a fallback
const ok2 = await confirmDeleteBranch({
Expand Down
Loading