After updating to version v0.10.0, I'm getting this error when passing a number parameter in the request body in json. #6197

Closed
opened 2026-02-21 18:14:30 -05:00 by yindo · 8 comments
Owner

Originally created by @IvanHenrique on GitHub (Oct 21, 2024).

Originally assigned to: @laipz8200 on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v0.10.0

Cloud or Self Hosted

Cloud

Steps to reproduce

variable input node with all the variables passed in the cal.com scheduleBooking API, in the CURL below:

curl --request POST
--url 'https://api.cal.com/v1/bookings?apiKey=TOKEN'
--header 'Content-Type: application/json'
--data '{
"eventTypeId": 1290514,
"start": "2024-10-22T15:00:00-03:00",
"responses": {
"name": "Ivan Melo",
"email": "teste@teste.com",
"location": {
"value": "Endereço",
"optionValue": "teste"
},
"description": "teste"
},
"timeZone": "America/Sao_Paulo",
"language": "pt-BR",
"metadata": {}
}'

But informing the input variables in json, including the eventTypeId which is of type number and is causing this error, according to my tests.

{
"eventTypeId": {{#1729122527484.eventTypeId#}},
"start": "{{#1729122527484.startTime#}}",
"responses": {
"name": "{{#1729122527484.name#}}",
"email": "{{#1729122527484.email#}}",
"description": "{{#1729122527484.description#}}",
"location": {
"value": "Endereco",
"optionValue": "{{#1729122527484.address#}}"
}
},
"timeZone": "{{#1729122527484.timezone#}}",
"metadata": {},
"language": "pt-BR"
}

The request is not even executed by dify, giving the error below:

error_body_json_number_parameter

✔️ Expected Behavior

Request executed successfully, as it was doing normally until yesterday.

Actual Behavior

error_body_json_number_parameter

Originally created by @IvanHenrique on GitHub (Oct 21, 2024). Originally assigned to: @laipz8200 on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version v0.10.0 ### Cloud or Self Hosted Cloud ### Steps to reproduce variable input node with all the variables passed in the cal.com scheduleBooking API, in the CURL below: curl --request POST \ --url 'https://api.cal.com/v1/bookings?apiKey=TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "eventTypeId": 1290514, "start": "2024-10-22T15:00:00-03:00", "responses": { "name": "Ivan Melo", "email": "teste@teste.com", "location": { "value": "Endereço", "optionValue": "teste" }, "description": "teste" }, "timeZone": "America/Sao_Paulo", "language": "pt-BR", "metadata": {} }' But informing the input variables in json, including the eventTypeId which is of type number and is causing this error, according to my tests. { "eventTypeId": {{#1729122527484.eventTypeId#}}, "start": "{{#1729122527484.startTime#}}", "responses": { "name": "{{#1729122527484.name#}}", "email": "{{#1729122527484.email#}}", "description": "{{#1729122527484.description#}}", "location": { "value": "Endereco", "optionValue": "{{#1729122527484.address#}}" } }, "timeZone": "{{#1729122527484.timezone#}}", "metadata": {}, "language": "pt-BR" } The request is not even executed by dify, giving the error below: ![error_body_json_number_parameter](https://github.com/user-attachments/assets/f70a473b-1806-4447-9e99-73cf58852b79) ### ✔️ Expected Behavior Request executed successfully, as it was doing normally until yesterday. ### ❌ Actual Behavior ![error_body_json_number_parameter](https://github.com/user-attachments/assets/9fe33c57-31ba-4ccd-a178-79390836e4fd)
yindo added the 🐞 bug label 2026-02-21 18:14:30 -05:00
yindo closed this issue 2026-02-21 18:14:30 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 21, 2024):

@IvanHenrique Hello there! I'm here to help you with bug reports, questions, and contributions.

The error message you're encountering, "Expecting property name enclosed in double quotes," typically indicates a syntax issue in your JSON. JSON keys must be enclosed in double quotes. In your provided JSON snippet, it seems like the placeholder for eventTypeId is not correctly formatted.

Here's a corrected version of your JSON:

{
  "eventTypeId": "{{#1729122527484.eventTypeId#}}",
  "start": "{{#1729122527484.startTime#}}",
  "responses": {
    "name": "{{#1729122527484.name#}}",
    "email": "{{#1729122527484.email#}}",
    "description": "{{#1729122527484.description#}}",
    "location": {
      "value": "Endereco",
      "optionValue": "{{#1729122527484.address#}}"
    }
  },
  "timeZone": "{{#1729122527484.timezone#}}",
  "metadata": {},
  "language": "pt-BR"
}

Ensure that all keys and string values are enclosed in double quotes. If eventTypeId is a number, make sure that the placeholder resolves to a valid number without quotes when the JSON is processed. If the placeholder syntax is causing issues, you might need to check how these placeholders are being replaced in your application logic.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 21, 2024): <!-- Greeting --> @IvanHenrique Hello there! I'm here to help you with bug reports, questions, and contributions. <!-- Answer --> The error message you're encountering, "Expecting property name enclosed in double quotes," typically indicates a syntax issue in your JSON. JSON keys must be enclosed in double quotes. In your provided JSON snippet, it seems like the placeholder for `eventTypeId` is not correctly formatted. Here's a corrected version of your JSON: ```json { "eventTypeId": "{{#1729122527484.eventTypeId#}}", "start": "{{#1729122527484.startTime#}}", "responses": { "name": "{{#1729122527484.name#}}", "email": "{{#1729122527484.email#}}", "description": "{{#1729122527484.description#}}", "location": { "value": "Endereco", "optionValue": "{{#1729122527484.address#}}" } }, "timeZone": "{{#1729122527484.timezone#}}", "metadata": {}, "language": "pt-BR" } ``` Ensure that all keys and string values are enclosed in double quotes. If `eventTypeId` is a number, make sure that the placeholder resolves to a valid number without quotes when the JSON is processed. If the placeholder syntax is causing issues, you might need to check how these placeholders are being replaced in your application logic. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@IvanHenrique commented on GitHub (Oct 21, 2024):

@dosu First of all, thanks for the answer.

eventTypeId is a numeric field.

https://cal.com/docs/api-reference/v1/bookings/creates-a-new-booking

image

everything is in double quotes.

If I pass the eventTypeId with quotes, the API doesn't accept it.

And all the variables are being passed normally.

Until yesterday, this flow was working normally.

@IvanHenrique commented on GitHub (Oct 21, 2024): @dosu First of all, thanks for the answer. eventTypeId is a numeric field. https://cal.com/docs/api-reference/v1/bookings/creates-a-new-booking ![image](https://github.com/user-attachments/assets/e1e42f9c-2fcc-4a4e-80ce-ad2067a1ea30) everything is in double quotes. If I pass the eventTypeId with quotes, the API doesn't accept it. And all the variables are being passed normally. Until yesterday, this flow was working normally.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 21, 2024):

Could you provide more details about how the placeholders are being replaced in your application? It would be helpful to know if there have been any changes in the way these placeholders are processed or if there are any logs that might indicate where the issue is occurring. Additionally, are there any recent updates or changes in the API or your application that might have affected this behavior?

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 21, 2024): <!-- Answer --> Could you provide more details about how the placeholders are being replaced in your application? It would be helpful to know if there have been any changes in the way these placeholders are processed or if there are any logs that might indicate where the issue is occurring. Additionally, are there any recent updates or changes in the API or your application that might have affected this behavior? <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@IvanHenrique commented on GitHub (Oct 21, 2024):

image
@dosu
Here is the filled input variable.

If I remove this "eventTypeId" field from the json it will stop giving this error, but since it is mandatory the API will criticize it.

And no, this workflow has not changed since yesterday!

@IvanHenrique commented on GitHub (Oct 21, 2024): ![image](https://github.com/user-attachments/assets/e65678c4-a120-4107-9f1b-21df236b0ee0) @dosu Here is the filled input variable. If I remove this "eventTypeId" field from the json it will stop giving this error, but since it is mandatory the API will criticize it. And no, this workflow has not changed since yesterday!
Author
Owner

@EcoleKeine commented on GitHub (Oct 21, 2024):

number in http request body json change to null when requesting

{"page":{"start":0,"limit":10}, ...}
...
Content-Length: 4060\r\n\r\n{\"page\": {\"start\": null, \"limit\": null}, ...
@EcoleKeine commented on GitHub (Oct 21, 2024): number in http request body json change to null when requesting ```json {"page":{"start":0,"limit":10}, ...} ``` ``` ... Content-Length: 4060\r\n\r\n{\"page\": {\"start\": null, \"limit\": null}, ... ```
Author
Owner

@dosubot[bot] commented on GitHub (Oct 21, 2024):

The issue seems to be related to how the eventTypeId placeholder is being replaced in your JSON request. Since eventTypeId is a numeric field, it should not be enclosed in quotes when the JSON is processed. The error message indicates a JSON syntax issue, likely due to the placeholder not being replaced correctly.

To resolve this, ensure that the placeholder for eventTypeId is replaced with a numeric value without quotes. If the placeholder replacement logic in your application has not changed, verify that the data source providing the eventTypeId is correctly configured to supply a numeric value. Additionally, check if there have been any updates or changes in the Dify platform or your application that might affect placeholder processing.

If you have access to logs or debugging tools, use them to trace how the placeholder is being replaced and identify any discrepancies. Dify provides a Prompt Log feature that can help you debug and view the complete prompts, including input variable content [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 21, 2024): <!-- Answer --> The issue seems to be related to how the `eventTypeId` placeholder is being replaced in your JSON request. Since `eventTypeId` is a numeric field, it should not be enclosed in quotes when the JSON is processed. The error message indicates a JSON syntax issue, likely due to the placeholder not being replaced correctly. To resolve this, ensure that the placeholder for `eventTypeId` is replaced with a numeric value without quotes. If the placeholder replacement logic in your application has not changed, verify that the data source providing the `eventTypeId` is correctly configured to supply a numeric value. Additionally, check if there have been any updates or changes in the Dify platform or your application that might affect placeholder processing. If you have access to logs or debugging tools, use them to trace how the placeholder is being replaced and identify any discrepancies. Dify provides a Prompt Log feature that can help you debug and view the complete prompts, including input variable content <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-orchestrate/prompt-engineering/prompt-engineering-expert-mode.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@boboboss commented on GitHub (Oct 22, 2024):

请求时http请求体json中的数字变为null

{"page":{"start":0,"limit":10}, ...}
...
Content-Length: 4060\r\n\r\n{\"page\": {\"start\": null, \"limit\": null}, ...

这个问题解决了么。

@boboboss commented on GitHub (Oct 22, 2024): > 请求时http请求体json中的数字变为null > > ```json > {"page":{"start":0,"limit":10}, ...} > ``` > > ``` > ... > Content-Length: 4060\r\n\r\n{\"page\": {\"start\": null, \"limit\": null}, ... > ``` 这个问题解决了么。
Author
Owner

@boboboss commented on GitHub (Oct 22, 2024):

请求时http请求体json中的数字变为null

{"page":{"start":0,"limit":10}, ...}
...
Content-Length: 4060\r\n\r\n{\"page\": {\"start\": null, \"limit\": null}, ...

0.10.0的问题好多呀,再http请求这一块儿

@boboboss commented on GitHub (Oct 22, 2024): > 请求时http请求体json中的数字变为null > > ```json > {"page":{"start":0,"limit":10}, ...} > ``` > > ``` > ... > Content-Length: 4060\r\n\r\n{\"page\": {\"start\": null, \"limit\": null}, ... > ``` 0.10.0的问题好多呀,再http请求这一块儿
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6197