Skip to content

Commit 35a297e

Browse files
committed
doveadm: Throw error if response is missing a type
1 parent 6416f28 commit 35a297e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/data/doveadm.data.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ async function normalizeDoveadm(doveadm) {
114114
const response = []
115115
for (const [k2, v2] of Object.entries(v.response)) {
116116
var rtl = responseTypeLookup(v2.type)
117+
if (!rtl) {
118+
throw new Error('Response item "' + k2 + '" for entry "' + k + '" is missing type!')
119+
}
117120
response.push({
118121
example: v2.example ?? rtl[1],
119122
key: k2,

0 commit comments

Comments
 (0)