[feat] onError event instead of exception for error handling on initialization