unify error code
add test case #28