Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show undefined results in fetch preview window #1083

Closed
2 tasks done
Janpot opened this issue Oct 3, 2022 · 0 comments · Fixed by #1153
Closed
2 tasks done

Show undefined results in fetch preview window #1083

Janpot opened this issue Oct 3, 2022 · 0 comments · Fixed by #1153
Assignees
Labels
bug 🐛 Something doesn't work feature: Queries Making new API requests

Comments

@Janpot
Copy link
Member

Janpot commented Oct 3, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

User specifies a function body without a return statement. e.g.

'hello';

or a non existing property:

return hello.idontexist

currently the preview window stays empty

Expected behavior 🤔

it shows undefined

Steps to reproduce 🕹

Steps:

  1. create query
  2. enable transforn
  3. add function body: return;
  4. press "preview"

Context 🔦

Additionally to enlarge the pit of success we could add

  • a short helper text + link to docs about what sort of code should be entered in the transform editor
  • an info message when the preview returns undefined that asks the user whether they perhaps forgot a return statement, or are accessing a non-existing property. We should probably not make this an error as there may be valid use-cases

Your environment 🌎

No response

@Janpot Janpot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer bug 🐛 Something doesn't work feature: Queries Making new API requests and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 3, 2022
@bytasv bytasv self-assigned this Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work feature: Queries Making new API requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants