Closed crwood closed 6 months ago
"read-only" is intended to be optional, as per its docstring -- which I guess would have been more obvious if there was docs written I guess :/
(Attempting to make some tests fail ... but not yet; see branch)
Okay, got a failure .. cli-parsing was sending it as "0" when not specified :/
As of Magic-Folder version 24.1.0, attempting to "join" an invite (via a web API
POST
to/experimental/<folder>/join
with JSON body containing currently-documented keys/values) returns a 400 HTTP error with a body of'{"reason": "Extra keys: read-only"}'
.Upon looking at the higher-level
MagicFolderClient.join
code, I notice that a"read-only"
key is now always being passed to "join" CLI calls. It is unclear to me, however, whether this option is actually supposed to be required (since it does not appear to be documented?). Nevertheless, if I include a "read-only" key in the JSON body of myPOST
(with a value ofNone
orFalse
), I'm able to successfully complete the invite via the web API.If the
read-only
key is supposed to be required, consider updating the error message accordingly (e.g., to "Missing key(s)..." instead of "Extra keys..."). If, on the other hand,read-only
is intended to be optional, the error message above seems the result of a bug somewhere. In any case, it would be useful if the intended usage of the option (including it's expected behavior and possible values) was documented alongside the others indocs/invites.rst
.Note that this issue is not present in the previous version of Magic-Folder (23.6.0).