I'd do more something like:
```javascript
e = e || "UnknownError";
console.error('Unexpected error while closing the activity:', e);
```
Otherwise we won't see any message if the promise is just rejected without any reason. (which won't happen with the current code, but let's try to have a future-friendly code :) ).