unexpected token
i keep getting the message below when i try to run an API node with a fairly large body, could this be due to a size limit being reached? how can i fix this
"message": "An error occurred while fetching: SyntaxError: Unexpected token 'r', "request en"... is not valid JSON"
Solution:Jump to solution
@Mig, If you check the logs of the test execution, by opening the nested error logs, it is showing this error -
Number of request tokens has exceeded your per-minute rate limit (https://docs.anthropic.com/en/api/rate-limits); see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase.
at Fill in Nodes and...9 Replies
i replicated the node logic in a local javascript file & it ran perfectly fine, so im thinking this could be the issue. How can i increase the size limit?
To address issues related to node size limits in BuildShip, you might need to consider the constraints of your current plan or configuration. For specific guidance on increasing size limits or adjusting configurations, please submit your query via the in-app support button.
@Mig, the error is a syntax error, it is not due to any size limit, on checking your workflow you shared via in-app support, in your API Call node validate input, you are passing body which has variables, you'll require to pass these variables values in body, example:
{"use_case": "my use case"}
.in the body.The error occurs in the "create nodes and edges" node on the left, I recreated the logic for that node in a javascript file and ran it locally and it worked fine
Could you try making a full workflow test with the required body? As the create nodes and edges is also an api call node which contains a variable usecase in the body, it is most probably that the value of usecase is coming a undefined, you can add a log node before the api call node and log the value of the usecase variable to confirm if the variable value is correct before passing it as body to the api call node.
Ive made sure that when I test this node I replace the use case variable with an actual value, I can try a full workflow test later
it worked when i ran the full workflow, i just dont understand why it wouldnt work when i test just the node, if im passing the same value for "use_case"
actually now its happening again but now from the full workflow test, not sure what happened, i did not change the body at all from when it worked the first time and now the second time i tried with the same body it gave me this message.
Solution
@Mig, If you check the logs of the test execution, by opening the nested error logs, it is showing this error -
Number of request tokens has exceeded your per-minute rate limit (https://docs.anthropic.com/en/api/rate-limits); see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase.
at Fill in Nodes and Edges output, due to which input values for the Input User Variables to nodes. Hope this helps, you'll require to reduce the prompt size.Ok I see, thank you