commit 1faff551f2865240a237a46fa8e2b4445a37a3cc
Author: Shuicheng Lin <email address hidden>
Date: Wed Mar 13 00:57:54 2019 +0800
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 <email address hidden>
Reviewed: https:/ /review. openstack. org/642664 /git.openstack. org/cgit/ openstack/ stx-fault/ commit/ ?id=1faff551f28 65240a237a46fa8 e2b4445a37a3cc
Committed: https:/
Submitter: Zuul
Branch: master
commit 1faff551f286524 0a237a46fa8e2b4 445a37a3cc
Author: Shuicheng Lin <email address hidden>
Date: Wed Mar 13 00:57:54 2019 +0800
catch the correct exception for alarm not found case
Issue: alarm_delete/ event_show api, if the input UUID
for the alarm_show/
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: alarm-delete/ event-show" with valid/invalid
Run "fm alarm-show/
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: I8d17c5bc55733f 269d875ae835ab6 295fed4d899
Signed-off-by: Shuicheng Lin <email address hidden>