Break api error handling into a new pkg
Use new api/errors, get rid of api.* error code