On error return the api name and the erorcode