A light wrapper around the top level of CPS functions that calls either a success or error callback based on the arguments passed.