free-be-account 0.0.17 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1223,7 +1223,14 @@ module.exports = (app) => ({
1223
1223
  }
1224
1224
  }
1225
1225
 
1226
- const result = await m.sms.sendRandom(phone, m.config.smsFormat || undefined, true, req.body.smsTemp || 'register');
1226
+ let result;
1227
+ try {
1228
+ result = await m.sms.sendRandom(phone, m.config.smsFormat || undefined, true, req.body.smsTemp || 'register');
1229
+ } catch (ex) {
1230
+ app.logger.error(ex.message);
1231
+ res.makeError(504, ex.message || 'Failed to send sms!', m);
1232
+ return next('route');
1233
+ }
1227
1234
 
1228
1235
  if (!result) {
1229
1236
  res.makeError(500, 'Failed to send sms!', m);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-be-account",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "main": "index.js",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {