enhanced error handling of proxy & stub