mirror of
https://github.com/carey314/mio-plugin-fund.git
synced 2026-08-10 05:44:31 +00:00
fix(add): surface search failure with error toast
Catch block previously set hits = [] silently, so a 15s network timeout looked like "no funds matched". Now an error toast tells the user it's a network issue, distinct from "no results." P0 from 2026-05-19 code review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a4a747bc77
commit
0d28e9e9d4
@ -136,7 +136,11 @@ struct AddView: View {
|
|||||||
do {
|
do {
|
||||||
hits = try await FundClient.shared.search(q)
|
hits = try await FundClient.shared.search(q)
|
||||||
} catch {
|
} catch {
|
||||||
|
// P0 fix (2026-05-19 review): silent swallow used to make
|
||||||
|
// a 15s network timeout look like "no funds matched". Surface
|
||||||
|
// the actual failure so users know it's network, not empty.
|
||||||
hits = []
|
hits = []
|
||||||
|
ToastController.shared.error("搜索失败,请检查网络后重试")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user