We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4a4c81 commit 9e6cd2dCopy full SHA for 9e6cd2d
src/modules/user_management/helpers.js
@@ -30,13 +30,16 @@ function processPayload (payload, topic) {
30
action: constants.USER_ACTIONS.KICK
31
}
32
case constants.KAFKA.TOPICS.CHALLENGE_NOTIFICATION_TOPIC:
33
+ if (!(payload.type in actionMap)) {
34
+ throw new Error(`Not supported ${payload.type}. Only message types ${JSON.stringify(Object.keys(eventTypes))} are processed from '${topic}'`)
35
+ }
36
return {
37
challengeId: payload.data.challengeId,
38
userId: payload.data.userId,
39
action: actionMap[payload.type]
40
41
default:
- throw new Error('Received message from unrecognized topic')
42
+ throw new Error(`Received message from unrecognized '${topic}'`)
43
44
45
0 commit comments