a base class for sdk with default error handler