@live-change/message-authentication-service 0.9.194 → 0.9.195

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/authentication.js CHANGED
@@ -176,7 +176,7 @@ definition.action({
176
176
  })
177
177
  authentication = checkResults[0]
178
178
  const authenticationData = await Authentication.get(authentication)
179
- if(authenticationData.state === 'used') throw 'authenticationUsed'
179
+ if(authenticationData.state === 'used') throw app.logicError("authenticationUsed")
180
180
  const actionName = authenticationData.action
181
181
  const actionResults = await service.trigger({ type: actionName+'Authenticated' }, {
182
182
  ...authenticationData.actionProperties,
@@ -208,7 +208,7 @@ definition.action({
208
208
  },
209
209
  async execute({ authentication }, { client, service }, emit) {
210
210
  const authenticationData = await Authentication.get(authentication)
211
- if(!authenticationData) throw 'notFound'
211
+ if(!authenticationData) throw app.logicError("notFound")
212
212
  const { contactType, contact, action } = authenticationData
213
213
  const secrets = await service.trigger({ type: 'refreshAuthenticationSecret' }, {
214
214
  authentication
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/message-authentication-service",
3
- "version": "0.9.194",
3
+ "version": "0.9.195",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,9 +21,9 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.9.194",
24
+ "@live-change/framework": "^0.9.195",
25
25
  "nodemailer": "^6.7.2"
26
26
  },
27
- "gitHead": "40d47cf397b45ca1f1fa888d4d85727376b2b0c0",
27
+ "gitHead": "9f61eddae56ddd89aba20988b8e208d948728496",
28
28
  "type": "module"
29
29
  }
package/sign.js CHANGED
@@ -167,7 +167,7 @@ for(const contactType of config.contactTypes) {
167
167
  c.type === contactTypeName && c.contact === contact
168
168
  )
169
169
  if(!contactData) throw contactTypeName+'MotFound'
170
- if(contacts.length === 1) throw 'lastOne'
170
+ if(contacts.length === 1) throw app.logicError("lastOne")
171
171
  console.log("DISCONNECT", contact)
172
172
  return await service.trigger({ type: 'disconnect' + contactTypeUName }, {
173
173
  [contactTypeName]: contact,