Steps to replicate the issue (include links if applicable):
- Go to https://www.wikifunctions.org/view/en/Z803
- In the Try this function box, enter Z1K1 as the “reference” under “key” (you may need to fiddle with “key” to get the “reference” box to appear T360580)
- In “type” under “object”, select “String”
- In the (literal string) “object” box, enter a string (or not)
- Click Run function
What happens?:
The result is Void. Click “Errors” to see the error(s): “Call tuples failed in returnOnFirstError. Error: TypeError: responseEnvelope.Z22K1.asJSON is not a function.”
What should have happened instead?:
The value associated with the Z1K1 key should have been returned ("Z6", interpreted (for consistency, see below) as a reference to the String type).
(Alternatively, a meaningful error result should have been returned.)
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
Behaviour for other objects is not entirely consistent.
- ✅ For Z41 and Z42 a reference to Boolean ("Z40") is displayed.
- 🤷♂️ For a Natural number, a full Type is displayed, rather than (a link to) Z13518 [edit: this seems to apply to all Types added since Z13518 but the expanded Type is observably not the value in the Z1K1 key of identity objects like Z16101, so this is wrong, in my opinion.]
- ✅ For a Typed list, the (generic type) function call is displayed [edit: I think I must have been mistaken here. For a Typed list, the fully expanded Type is displayed (including, in its identity key, the Z881 function call, where the list’s Type is an unexpanded Reference).]
- 🤷♂️ For a Function call, the displayed result follows from the type of the call’s evaluation (although the error in Z866 is “Call tuples failed in returnOnFirstError. Error: TypeError: Z1.getNameEphemeral is not a function.“) [edit: in particular, this means that a function returning a Type object will return an expanded Type rather than a Reference (unless it’s a pre-Z13518 Type). (See, for example, Z18628, where attempting to extract the Type (Reference) from a Typed list’s identity key will return a fully expanded Type even when the Z4K1 from the Z4K1 is specified.)]
- ✅ For types (generally), the displayed result is (a link to) Z4
- ❌ For Z20s, the result is a “Key not found” error, rather than (a link to) Z20
(This is not an exhaustive list.)
Where the value in the key–value pair is a string/reference we should consider displaying the result as a literal as well as a reference (the value in the object’s specified key being a string and the reference being an interpretation of that string).
Please also see https://www.wikifunctions.org/view/en/Z15781. This may be a separate bug, but the test shows as “Passed”, with Details being:
Reached time limit in orchestrator
Error type: Reached time limit in orchestrator
Editing the source, it seems always to produce this result for the Z4K1 of Natural number so long as the Key reference is either "Z1K1" or "Z6K1". This suggests that the initial (Z4K1) call to Z803 is returning a String object and the second call is timing out. However, trying Z803 with Z4K1 on Z13518 currently times out (as it sometimes does with Z1K1), with Errors viewable. [edit: This no longer times out and will return a Reference to Z13518 if the Z4K1 of the Z1K1 of a Natural number is requested (as well as if the Z4K1 of Z13518 is requested) ✅🤔 This is good but inconsistent with the behaviour of Z18628 described above. Running Z803 in Try this function returns a Reference rather than a fully expanded Type:
.]

