fix bug TDIS-5685

[API][Alarm] No exception should be thrown when the parameter is invalid