Make the error handling more robust for local charm upload failures