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
..
2019-06-13 10:25:41 -07:00
2023-03-02 19:32:25 +00:00
2023-03-02 19:32:25 +00:00