When a patch installation is triggered on a locked host via Horizon,
it crashes redirecting to an error screen. The normal behaviour seen
using the CLI is just an error message saying that the host is unknown
because of being locked.
Horizon should show this error message instead of crashing. The root
cause is an issue during raising the ValueError expection, because
of an 'AttributeError' exception raised on the 'split_message'
function.
This commit fixes this problem by replacing the ValueError exception
with the Horizon error message function.
Closes-Bug: 2040495
Test Plan:
PASS: Build the starlingx-dashboard package, install it on a
system and verify the changes are applied correctly.
PASS: Execute test scenarios to receive errors in various
requests impacted by this function. Verify that the error message
is correctly displayed and logged.
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Ia8cdce0b89be30abc632a8161201302cd9a51681