I have a workflow that ends with a run code API endpoint callback. Pretty straight forward response. I asked Gummie how to do this and was told to use run code. Makes sense. It provided a js function using axios which threw a bunch of axios not found errors. Then it recommend using the native fetch same thing. Then it switched to PY and more errors. Now I am as close as I have been to having it work but still these errors
Run Code Failed!
The JavaScript code in the function body raised the following error:
Error: Error: Network response was not ok Not Found
at /workspace/index.js:19:18
at process.processTicksAndRejections (node:internal/process/task_queues:95:5
Its a pretty basic script
function func(blogPost, callback_url) {
//Add function arguments by clicking +Add Inputs
//Add returned outputs by clicking +Add Outputs
//Uploaded files can be accessed directly from the current working directory with the filename
//Your JavaScript Code Here
// Make API request using fetch
return fetch(callback_url, {
method: ‘POST’,
headers: {
‘Content-Type’: ‘application/json’
},
body: JSON.stringify({
blogPost: blogPost
})
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok ’ + response.statusText);
}
return response.json();
})
.then(data => {
console.log(‘Success:’, data);
})
.catch(error => {
console.error(‘Error:’, error);
});
Hey @surferdave! If you’re reporting an issue with a flow or an error in a run, please include the run link and make sure it’s shareable so we can take a look.
Find your run link on the history page. Format: https://www.gumloop.com/pipeline?run_id={{your_run_id}}&workbook_id={{workbook_id}}
Make it shareable by clicking “Share” → ‘Anyone with the link can view’ in the top-left corner of the flow screen.
Provide details about the issue—more context helps us troubleshoot faster.
Hey @surferdave! We usually don’t have capacity to provide support for code since it’s highly personalized, but to fix the “Not Found” error you can try the following:
Make sure the URL is correct and properly formatted.
Ensure that the endpoint you’re trying to reach is active.
Use a tool like Postman or curl to check if the API endpoint works independently.
In the custom node, you can have the AI add print statements at key points. Based on the responses, you can identify the root cause—or paste the error/print statements back into the AI prompt to help fix the code for you.
thanks for the quick reply. New to gumloop and the error message included a link to support and implied that’s where I should go for help and it seemed like a app error not a user error. I have since solved it so thank you for pointing me in the right direction and quick reply