change the api

add error