We should add a catch like this:

```javascript
.catch(function(err) {
  console.error('Unexpected error while closing the activity: ', err);
});
```

Otherwise errors can be lost in black holes :)