use http status code instead of throwing a exception 

Signed-off-by: yuanhuan <yuanhuan@tcl.com>