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

http节点的body中,json引用前一个模块的输出失败 #407

Open
gz9620 opened this issue Dec 18, 2024 · 2 comments
Open

http节点的body中,json引用前一个模块的输出失败 #407

gz9620 opened this issue Dec 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@gz9620
Copy link

gz9620 commented Dec 18, 2024

代码执行内容如下:
image
http节点body请求体内容如下:
image
将上图中红框的部分换成["美团", "京东"]可正常运行
image
image
上述方法传参,报错
image
为什么传参的方式不行?

Copy link

dosubot bot commented Dec 18, 2024

@gz9620 你好!我是Dosu,一个可以帮助你解决程序bug,回答问题,并成为贡献者的机器人。我在这里帮你解决问题,等待人类维护者的到来。

The issue you're encountering with the JSON parsing error in the HTTP request node likely stems from how the output from the previous module is being referenced or formatted in the JSON body. When you manually replace the rejectContent field with ["美团", "京东"], it works correctly, indicating that the problem is with how the dynamic content is being inserted.

Here are a few things to check and try:

  1. Ensure Correct Data Type: Make sure that the output from the previous module is indeed an array of strings, as expected. If the output is not directly an array or if it's being referenced incorrectly, it could cause parsing issues.

  2. Correct Reference Syntax: Verify that the syntax used to reference the previous module's output in the JSON body is correct. The reference should match the expected format for dynamic content insertion in your environment.

  3. Debugging Output: Print or log the actual content being inserted into the rejectContent field before the HTTP request is made. This can help confirm whether the data is in the expected format.

  4. Escape Characters: Ensure that any special characters in the strings are properly escaped if necessary.

If these steps do not resolve the issue, consider providing more details about how the output is being referenced in the JSON body, as there might be specific syntax or formatting requirements in your environment that need to be addressed.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the bug Something isn't working label Dec 18, 2024
@gz9620
Copy link
Author

gz9620 commented Dec 19, 2024

前后模块生成的内容均无问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant