I have a Workflow containing a multi-step function called "pullCustomerData". When I run the Workflow, the function is throwing an Internal Error (see screenshot below). I can't find a more verbose error or logs that indicate what the error is.
What'd odd is that when I go to the function and run each step sequentially, the function runs fine from start to finish.
Is this an internal Retool error, or is it a problem with how our Workflow/function is setup? How can I investigate this further?
My Workflow calls a multi-step Function that takes a single (somewhat large) JSON object parameter.
After adding some JSON data as the Function's sample value / test parameter, when I click "Run" on each successive block in the Function, the entire Function works as expected. Each block takes in the input from the previous block, and produces an expected output.
However, when I click "Test" to run the entire Function end-to-end, I get the following error: "Internal Error running a block: Error: An internal server error occurred". See below for the browser console log containing the error.
The plot thickens: when I change the test parameter to a string, I no longer see this error, and I see a less mysterious error that has to do with my first block expecting a JSON input but getting a string input.
Could there be an issue in running this Function with a large JSON input/parameter?
The function itself does not contain code that attempts to access a loggingMetadata property. Wondering if loggingMetadata is Retool server or app code?
Notice on the left hand side of the screenshot that none of the individual blocks contained within the function are erroring.
Very strange - have you double checked the value that's being passed to the function when you test the whole things, vs. one step at a time? It is possible it's incorrectly formatted JSON. You should be able to check with input block, or the output of whatever block you're passing in.
It could just be a Retool bug, but if it works one at a time, it seems like it could also be something wrong with the parameter formatting/content.
Very odd that the block runs fine on its own but fails in the flow.
I wish we had some better options to find out more details about this error, I can definitely report this back to our engineer team that 'internal server error' is vague and needs better explination.
Are you self-hosted or running on the Retool cloud? My guess is this might be a time out issue due to the size of the data.
I know you mentioned that you were testing it with 'dummy' data and that worked fine. If possible, could you test the block with JSON that is the size of the object it would be handling in the full workflow?
If you are on cloud we may be able to look up the query based on the request-ID to see if our logs have more info on the 'internal server error'. And if you are self-hosted, there may be some options we can tweak to keep it from erroring out.
How long does the query/block run for in seconds before it errors out?