I think this will break because the 'error' variable is not defined. You probably want to do something like

```
var error = 'No group with that id!';
```