PipedreamHQ / PipedreamHQ/pipedream
[FEATURE] `$.send.http` should throw a `ConfigurationError` if `body` instead of `data` is passed
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
**Is your feature request related to a problem? Please describe.**
When using `$.send.http` to send HTTP requests in workflows, it's very easy to forget that `data` is the correct key for payloads, and not `body`.
Example:
```javascript
// this request fails silently, the request is never made.
await $.send.http({
url: "https://.m.pipedream.net/",
method: 'POST',
body: item
});
```
Currently if you forget this, the HTTP request isn't sent - but it fails _silently_.
This leads to a very bad DX. Developers are unsure why their requests aren't working.
**Describe the solution you'd like**
`$.send.http` should throw a `ConfigurationError` if `body` instead of `data` is passed.
**Additional context**
Example affecting a user: https://pipedream-users.slack.com/archives/CPTJYRY5A/p1659026266899159?thread_ts=1659023776.746629&cid=CPTJYRY5A
Contributor guide
Assessment
This issue has not been assessed yet.