The government of Spain should indeed apologize for forcefully trying to prevent Catalans from voting in an independence referendum. Doing so was unnecessary, ill-considered and heavy-handed. It's difficult to imagine a greater insult to democracy than the police confiscating ballots and physically confronting voters. Having said that, the government of Catalonia went about its quest for independence in an amateurish way. 

Let's be clear: secession is a very serious matter. Wars are fought over it. Yet Catalonia treated their secession like they were just a football club leaving to start another league. The referendum the Catalan government held was also an affront to democracy. Just for starters, it disenfranchised the 39 million Spaniards that don't live in Catalonia! That's not going to cut it under modern notions of democracy.