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 <ericfahlgren@gmail.com>
This commit is contained in:
Eric Fahlgren
2026-03-20 20:54:09 -07:00
committed by Paul Donald
parent d7087a1165
commit a57e5e10a2
@@ -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'), ' ',