Report status code to taskEnded for better logging