Comment 2 for bug 2037320

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/900945
Committed: https://opendev.org/starlingx/config/commit/56a6555315fa8da86f469b18ee83eea7c5e6ca84
Submitter: "Zuul (22348)"
Branch: master

commit 56a6555315fa8da86f469b18ee83eea7c5e6ca84
Author: Takamasa Takenaka <email address hidden>
Date: Tue Nov 14 18:33:35 2023 -0300

    Set default error message for for forbidden

    The issue is that some error dialog shows
    "the JSON object must be str, bytes or
    bytearray, not NoneType" when non admin user
    tries to modify configuration.

    Functional-wise it is expected behavior to
    reject configure operation because of
    forbidden. But this message is not proper
    for users.

    This happens when it extracts the error message
    from api, it is a case to be empty. The fix
    is check empty message and show the default
    message if it is empty.

    Closes-bug: 2037320

    Test Plan:
    PASS: Confirm error message dialog contains
          proper text in detail.

    Change-Id: I980df3356b60a59b19ec8b552f848e63dec3b621
    Signed-off-by: Takamasa Takenaka <email address hidden>