summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiperac <[email protected]>2026-06-15 07:36:55 +0200
committerGitHub <[email protected]>2026-06-15 07:36:55 +0200
commit963a54b2ca82f7b49d95a4c62bcc6c1a12949d62 (patch)
tree4bf3a2d5e4cd278c11920785bdb242db83bd520f
parent60ee90e98ff3edbc4629b1b448cdc62aec09365c (diff)
parent3bdda3f2da2f00a0760e931ffe05630d46051a9b (diff)
Merge pull request #5 from spiperac/dev
fix: Fixed silent error swallowing
-rw-r--r--internal/ui/history.go4
-rw-r--r--internal/ui/intruder.go3
-rw-r--r--internal/ui/loot.go2
-rw-r--r--internal/ui/plugins.go2
-rw-r--r--internal/ui/scope.go12
5 files changed, 21 insertions, 2 deletions
diff --git a/internal/ui/history.go b/internal/ui/history.go
index 18ead77..6bf3645 100644
--- a/internal/ui/history.go
+++ b/internal/ui/history.go
@@ -545,6 +545,7 @@ func (h *historyTab) deleteSelectedHost() {
}
if err := h.projectStore.DeleteTransactionsByHostPort(host, port); err != nil {
logger.Error("history: delete %s:%d: %v", host, port, err)
+ dialog.ShowError(err, h.win)
return
}
h.siteMap.mu.Lock()
@@ -822,6 +823,7 @@ func (h *historyTab) loadAnnotations() {
func (h *historyTab) clearHistory() {
if err := h.projectStore.ClearHistory(); err != nil {
logger.Error("clear history: %v", err)
+ dialog.ShowError(err, h.win)
return
}
h.mu.Lock()
@@ -1226,6 +1228,7 @@ func (h *historyTab) showCommentDialog(historyID uint64) {
a.Comment = entry.Text
if err := h.projectStore.SetAnnotation(a); err != nil {
logger.Error("history: set annotation comment: %v", err)
+ dialog.ShowError(err, h.win)
return
}
h.annotationsMu.Lock()
@@ -1263,6 +1266,7 @@ func (h *historyTab) showHighlightMenu(historyID uint64) {
a.Color = hc.color
if err := h.projectStore.SetAnnotation(a); err != nil {
logger.Error("history: set annotation color: %v", err)
+ dialog.ShowError(err, h.win)
return
}
h.annotationsMu.Lock()
diff --git a/internal/ui/intruder.go b/internal/ui/intruder.go
index 7527b82..83f81e1 100644
--- a/internal/ui/intruder.go
+++ b/internal/ui/intruder.go
@@ -23,6 +23,7 @@ import (
"fyne.io/fyne/v2/widget"
internalhttp "github.com/shiv/internal/http"
+ "github.com/shiv/internal/logger"
"github.com/shiv/internal/store"
"github.com/shiv/internal/ui/widgets"
)
@@ -197,6 +198,8 @@ func (t *intruderTab) buildRequestPane() fyne.CanvasObject {
defer readCloser.Close()
data, err := io.ReadAll(readCloser)
if err != nil {
+ logger.Error("intruder: read payloads file: %v", err)
+ dialog.ShowError(err, t.win)
return
}
t.payloadEntry.SetText(string(data))
diff --git a/internal/ui/loot.go b/internal/ui/loot.go
index df98ee0..4d63132 100644
--- a/internal/ui/loot.go
+++ b/internal/ui/loot.go
@@ -124,6 +124,7 @@ func (l *lootTab) build() fyne.CanvasObject {
}
if err := l.projectStore.DeleteLoot(entry.ID); err != nil {
logger.Error("loot: delete: %v", err)
+ dialog.ShowError(err, l.win)
return
}
l.selectedIdx = -1
@@ -160,6 +161,7 @@ func (l *lootTab) build() fyne.CanvasObject {
}
if err := l.projectStore.DeleteLoot(entry.ID); err != nil {
logger.Error("loot: delete: %v", err)
+ dialog.ShowError(err, l.win)
return
}
l.selectedIdx = -1
diff --git a/internal/ui/plugins.go b/internal/ui/plugins.go
index cf29f37..8a716f5 100644
--- a/internal/ui/plugins.go
+++ b/internal/ui/plugins.go
@@ -11,6 +11,7 @@ import (
"fyne.io/fyne/v2/widget"
"github.com/shiv/internal/events"
+ "github.com/shiv/internal/logger"
"github.com/shiv/internal/store"
"github.com/shiv/internal/ui/widgets"
)
@@ -53,6 +54,7 @@ func (t *pluginsTab) build() fyne.CanvasObject {
refreshAll := func() {
entries, err := t.projectStore.AllPlugins()
if err != nil {
+ logger.Error("plugins: load: %v", err)
return
}
plugins = entries
diff --git a/internal/ui/scope.go b/internal/ui/scope.go
index 037472c..9c5cef5 100644
--- a/internal/ui/scope.go
+++ b/internal/ui/scope.go
@@ -74,9 +74,13 @@ func showScopeDialog(projectStore *store.Store, win fyne.Window, onChanged func(
}
if err := projectStore.AddScopeEntry(host); err != nil {
logger.Error("scope: add entry: %v", err)
+ dialog.ShowError(err, win)
return
}
- newEntries, _ := projectStore.AllScopeEntries()
+ newEntries, err := projectStore.AllScopeEntries()
+ if err != nil {
+ logger.Error("scope: reload entries: %v", err)
+ }
rows = make([]row, len(newEntries))
for i, entry := range newEntries {
rows[i] = row{entry.ID, entry.Host}
@@ -94,9 +98,13 @@ func showScopeDialog(projectStore *store.Store, win fyne.Window, onChanged func(
entryId := rows[selectedIdx].id
if err := projectStore.DeleteScopeEntry(entryId); err != nil {
logger.Error("scope: delete entry: %v", err)
+ dialog.ShowError(err, win)
return
}
- newEntries, _ := projectStore.AllScopeEntries()
+ newEntries, err := projectStore.AllScopeEntries()
+ if err != nil {
+ logger.Error("scope: reload entries: %v", err)
+ }
rows = make([]row, len(newEntries))
for i, e := range newEntries {
rows[i] = row{e.ID, e.Host}