w3c / wot-scripting-api

Web of Things (WoT) Scripting API
http://w3c.github.io/wot-scripting-api/
Other
42 stars 28 forks source link

Explore other error conditions for fetching a Thing Description #446

Open relu91 opened 1 year ago

relu91 commented 1 year ago
    Here is also a good place to put the same error condition as specified in the `exploreDirectory` method:

if the underlying implementation cannot support the Protocol Binding indicated by |url|

_Originally posted by @relu91 in https://github.com/w3c/wot-scripting-api/pull/441#discussion_r1051420041_

zolkis commented 1 year ago

The problem here is that

If fetching a Thing Description is not supported by the implementation, ...

which is under-specified. We should have an algorithm for that, but it has been very tricky and there are good reasons why we don't have it. Fetch is a big spec itself, and that's only HTTP/S. Adding more protocols blows complexity upwards. That is outside the scope of the WoT Scripting spec (which is basically just a tad more than documentation for a library). We need to be able to describe choosing Protocol Bindings in terms of scripting algorithms, point to WoT and external algorithms from other specs etc.