fault/fm-rest-api/fm/fm
Shuicheng Lin 1faff551f2 catch the correct exception for alarm not found case
Issue:
for the alarm_show/alarm_delete/event_show api, if the input UUID
string is not valid, http server side will return error code 500
(Internal Server Error), due to the error code is not set correctly.
Solution:
Correct the error code in server, and add client code to handle
"HTTP 404 - Not Found" error code correctly.

Test:
Run "fm alarm-show/alarm-delete/event-show" with valid/invalid
UUID, and the response is correct. For invalid UUID, response
string will like below. "xxx" for the invalid UUID string.
"Alarm not found: xxx"
"Event log not found: xxx"

Closes-Bug: 1806927

Change-Id: I8d17c5bc55733f269d875ae835ab6295fed4d899
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2019-03-18 20:10:37 +08:00
..
api Enhance get list APIs for alarms and events 2019-01-25 10:43:57 -05:00
cmd Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
common catch the correct exception for alarm not found case 2019-03-18 20:10:37 +08:00
db Fix the conflict of urlparse between python2 and python3 2018-11-09 09:43:49 +08:00
objects Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04: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