Refactor error and post-deploy results handling.