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
*For a Typed list, the (generic type) function call is displayed
*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.“)
*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 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.