fault/fm-rest-api/fm/fm
fperez 448bb06c3b Fix fm-rest-api returning incorrect error codes
Some alarm and event exceptions in fm-rest-api are returning
HTTP 500 instead of the correct status code. This issue is related
to the exception class being used.

This commit corrects the returned value and prevents the default
exception from being generated.

Test Plan:
PASS: Apply the changes to the system. Use the 'fm alarm-show' or
      'event-show' commands with a non-existent UUID. Verify that
      the correct code is returned in both logs and console output.
PASS: Force other errors, such as invalid parameters (400) and
      unauthorized access (401), and verify that the returned code
      matches the expected value.

closes-bug: 2080697

Change-Id: Ie91dc3bba8efa0e1e47678f18710c83d97eb2905
Signed-off-by: fperez <fabrizio.perez@windriver.com>
2024-09-16 13:54:57 -03:00
..
api Implement access control for FM API 2022-08-26 10:54:39 -03:00
cmd Use newer flake8 on python3.8 zuul systems 2020-11-16 13:35:31 -06:00
common Fix fm-rest-api returning incorrect error codes 2024-09-16 13:54:57 -03:00
db Remove fm.common.utils.generate_uuid. 2020-01-17 12:04:21 +08:00
objects python3: Fix python3 compatibility issues 2021-08-16 13:10:27 +00:00
tests Implement access control for FM API 2022-08-26 10:54:39 -03:00
__init__.py Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
config-generator.conf Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
policy.yaml Define kernel mismatch alarms: 100.120, 100.121 2023-06-30 08:02:41 -04:00