Page MenuHomePhabricator

Function Evaluation: Instead of showing "void" when there's an error, show a UX component that the request failed
Closed, ResolvedPublic

Description

[Requested implicitly at https://www.wikifunctions.org/w/index.php?title=Wikifunctions_talk:Naming_conventions&diff=0&oldid=233615#c-Jdforrester_(WMF)-20251205152600-YoshiRulz-20251203170500 ]

Description

When a Function call returns an error, we generally set Z22K1 to Z24, and in the UX we show this as a link to Z24, "void". However, this is not very user-friendly experience. Instead, we should detect this state and show some sort of alert / way of informing the user that an error happened.

Note: What do we want to do when we both return a value and also an error? (This is officially supported by the function model, but might not actually work right now; either way, we should have a plan.)

Desired behavior/Acceptance criteria

  • Don't show "void"
  • Show something that clearly says an error happened

Devices and Design (URLs or screenshots)

  • Desktop: ...
  • Small screens/mobile: ...

Completion checklist

Event Timeline

I don’t object to “void” but it would seem more helpful, in general, to surface the explicit error. Without actually designing the user experience, I’d say we will always want to be able to see both parts of the response. I’m wary of shuffling things around according to the state of the response, but a stronger signal that there is an error might be achieved by just showing a link to the relevant error type. For consistency, a no-error link or text might be shown for a successful evaluation.

Change #1272606 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] FunctionEvaluator: Show error message when result is void (Z24)

https://gerrit.wikimedia.org/r/1272606

DSmit-WMF changed the task status from Open to In Progress.Apr 16 2026, 10:29 AM
DSmit-WMF claimed this task.

Proposal:

Screenshot 2026-04-16 at 12.47.32.png (852×1 px, 80 KB)

@DSmit-WMF We can go with the inline error message with a little change to the copy to make it concise:

No result returned. Open ‘Details’ for more information.

image.png (1×750 px, 82 KB)

Note: What do we want to do when we both return a value and also an error? (This is officially supported by the function model, but might not actually work right now; either way, we should have a plan.)

Do you have an example of such situation? @DSmit-WMF

Change #1272606 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] FunctionEvaluator: Show error message when result is void (Z24)

https://gerrit.wikimedia.org/r/1272606

@gonyeahialam This is more a question for @Jdforrester-WMF Who created the ticket. I think 'might not actually work right now' means there is no real world use case though. Not that I know of though

Note: What do we want to do when we both return a value and also an error? (This is officially supported by the function model, but might not actually work right now; either way, we should have a plan.)

Do you have an example of such situation? @DSmit-WMF

No current production examples that I know of, but someone could generate one if they wanted.

Im not sure the return value is z24 and the errors are in the metadata, This use case only works for returning a z24. Maybe if there are other uses cases we should handke that outside of this ticket?