I can only hope that the people in charge will see some legal consequences in their future.
This isn't just the state throwing a tantrum because they're embarrassed by their own incompetence. It's a warning to all immigrants that the state can do anything it wants to you, no matter how deranged, for no real reason at all.