fix(openwrt): detect opkg silent failure and show disk space error

BusyBox opkg exits 0 even when 'Cannot install' due to insufficient space,
causing the fallback to silently report success. Now captures stderr and
checks for the failure string explicitly.

Adds user-visible error for the common case where the router flash is too
small for the TollGate package (~19 MB needed vs ~9 MB available on typical
budget routers). Adds error prefixes to the RPC sanitizer allowlist so the
message reaches the UI instead of showing 'Check server logs'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 17:12:57 +00:00
co-authored by Claude Sonnet 4.6
parent f69fac627a
commit 4c56e1bb96
2 changed files with 23 additions and 1 deletions
@@ -66,6 +66,9 @@ pub(super) fn sanitize_error_message(msg: &str) -> String {
"Bitcoin address",
"No router",
"No OpenWrt",
"No space left",
"TollGate installation failed",
"No pre-built TollGate",
];
for prefix in &user_facing_prefixes {
if msg.starts_with(prefix) {