From: Eric Fahlgren Date: Sat, 21 Mar 2026 03:54:09 +0000 (-0700) Subject: luci-app-attendedsysupgrade: format error details X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=a57e5e10a234f414cbe059fb1508ab6600408bc0;p=openwrt-luci.git luci-app-attendedsysupgrade: format error details On certain rare errors, the ASU server returns a JSON formatted block of details. The app was just displaying this object directly, resulting in displaying a useless 'Object [object]'. If the error details are not a string, then stringify it so we can make sense of the error. Signed-off-by: Eric Fahlgren --- diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js index ca5f9954b4..19fc0d20c9 100644 --- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js +++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js @@ -283,6 +283,9 @@ return view.extend({ ...firmware }; const request_str = JSON.stringify(request_data, null, 4); + if (typeof response.detail != "string") { + response.detail = JSON.stringify(response.detail, null, 4); + } let body = [ E('p', {}, [ _('First, check'), ' ',