insomnia
insomnia copied to clipboard
Generate Client Code silently fails if an environment variable is undefined
Expected Behavior
Should be possible to generate a code with Generate Client Code dialog or via Copy as cUrl.
Actual Behavior
Generate Client Code dialog is not working - dropdowns are not working as well Also Copy as cUrl is not working.
https://user-images.githubusercontent.com/179605/171406432-08eff024-8487-4984-a429-c28ced9b773e.mov
Reproduction Steps
- Click Generate Code in the request menu
- Try to click on dropdowns Shell or Wget
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
Version: Insomnia 2022.3.0 Build date: 4/28/2022 OS: Darwin x64 21.4.0 Electron: 17.3.1 Node: 16.13.0 V8: 9.8.177.13-electron.0 Architecture: x64
Insomnia Version
2022.3.0
What operating system are you using?
macOS
Operating System Version
macOS Monterey 12.3.1
Installation method
homebrew
Last Known Working Insomnia version
Not sure which version but it worked previously
Found the reason, one of variables was not defined - but it was not indicating it anywhere. Need to display an error message.
Hi @relgames, thank you for reporting this! I was able to reproduce this as well.
Indeed this is a bug, we don't warn the user at the very least the same way we do when trying to send a request with an undefined variable.
This happens both for Generate Code
and the Copy as Curl
options. We are hiding the errors in both cases:
@relgames I would like to encourage you to report any other issues you may find in the meantime 👍
Hi all 👋
I am interested in working on this issue as my first contribution to the project. Is this still relevant? I'm eager to help out where I can.