PipedreamHQ / PipedreamHQ/pipedream

[BUG] Importing curl in the submit an app ui's results in unnecessary "data" variable being defined in the app's scaffolding

Open
#13,029 0 comments 0 reactions 0 assignees View on GitHub
bug tracked internally triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**Describe the bug**
When you import valid URL into the submit an app UI's test request area, the request is imported, but the app code that is generated in the different scaffolding defines a `data` variable, and uses it as a `body`, however, the `data `variable isn't set to a value resulting in a syntax error.
This is likely a side effect of the imported curl setting the `body `part of the test request to "none".

**To Reproduce**
Steps to reproduce the behavior:
1. Go to the Submit an app UI and fill an app's basic info and custom field.
2. Go to the Submit an app UI's "Authentication Strategy" area, selecting
3. Paste a curl command into the Test Request area. You can use a curl command link [LLMWhisperer's](https://docs.unstract.com/llm_whisperer/apis/llm_whisperer_apis_intro)
3.a If you have a --location like in LLMWhisperer, then please remove this switch, or otherwise make your your curl uses the --X Switch only because location is ignored.
5. After you import the curl, click save.

**Expected behavior**
A valid app request code should have been generated in the app's scaffolding code.

**Screenshots**
![image](https://github.com/user-attachments/assets/80c83029-5e98-4f44-b33c-413219669daf)

(circled in yellow) some data variable is defined but not set causing a syntax error in the scaffolding.
(circled in orange) this might be an actual problem related to the body part of the test request area being set to none upon importing via curl; the app code is generated after clicking on save, so this might be the culprit.

**Desktop (please complete the following information):**
- OS: Windows 11
- Browser Firefox
- 128.0.3

**Additional context**
Stumbled upon this a few times already

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.