add error handling for the the initialize_token and call method

TODO: extend the method to throw detail error in initialize_token