Fix improper error message when reducing partition size
When attempting to reduce partition size from the GUI, a generic error message is returned. This occurs because providing the complete error details to the error handler can lead to the generation of a distinct exception. Test plan: Install Standard. Create partition and attempt to reduce size from GUI. Verify that error message indicates that is not possible to reduce partitions. Also verify that right error message is present in horizon.log and that any other exception dissapear for this action. Closes-Bug: 2015918 Signed-off-by: fperez <fabrizio.perez@windriver.com> Change-Id: I9ad7315f9e428d029b30ea230c343a4fe1df8a5f
This commit is contained in:
parent
ba46600775
commit
db9bb2cf03
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2013-2021 Wind River Systems, Inc.
|
# Copyright (c) 2013-2023 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -678,7 +678,7 @@ class EditPartition(forms.SelfHandlingForm):
|
|||||||
# No redirect, return to previous storage tab view.
|
# No redirect, return to previous storage tab view.
|
||||||
# The REST API error message will appear on UI as
|
# The REST API error message will appear on UI as
|
||||||
# "horizon.exceptions.handle" will invoke "messages.error".
|
# "horizon.exceptions.handle" will invoke "messages.error".
|
||||||
return exceptions.handle(request, message=ce)
|
return exceptions.handle(request, message=msg)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = _('Failed to update partition.')
|
msg = _('Failed to update partition.')
|
||||||
LOG.info(msg)
|
LOG.info(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user