improve span submission error handling