add more info to response of the api

add error info to response of the api