change handleErrorAddingAlarm:
```javascript
  function handleErrorAddingAlarm(error) {
    console.error(error);
    return NO_ALARM_ID;
  }
```

and then you can do here:
```javascript
addAlarmTimeout(type, SERVICE_TIMEOUT)
  .catch(handleErrorAddingAlarm)
  .then(refreshUsageSilentSms)
```
(think try ... catch block, then normal code)