diff --git a/webapp/src/wot-client.js b/webapp/src/wot-client.js index edfb5709..b1aa58d6 100644 --- a/webapp/src/wot-client.js +++ b/webapp/src/wot-client.js @@ -71,7 +71,10 @@ export const wotStoreModule = { ) => { // Find the URL for a particular operation let td = state.thingDescriptions[thing]; - if (!td) return null; + if (!td) { + if (allowUndefined) return undefined; + throw `Could not find form for ${affordanceType} ${thing}/${affordance} with op ${op}`; + } let affordances = td[affordanceType]; let href = findFormHref(affordances[affordance], op); if (href == undefined) {