Old code is being executed after updating Execute Code block
# 🤝help


01/11/2024, 3:30 PM
Hey Everyone! I am busy creating an API Call to Chatbase with the following code (see below). As you can see in my code, I am using the conversationID = 'test-123456', but when I execute this block in my flow, I see that Botpress is executing 'test-12345' (my old version). What I also noticed is that Botpress is not logging the console.log(raw) and console.log('Joren'). I also didn't have this in my previous versions. So it seems that while I am updating my code, Botpress does not execute the updated code. Report-ID: a0b39917-1abd-45af-9117-ed1d799004dd Could anyone have a look at this or explain why this is happening?
Code is here: const chatbaseUrl = '' const chatbaseApiKey = 'NOT IN DISCORD' const raw = JSON.stringify({ messages: [ { content: 'test', role: 'user' } ], chatbotId: 'QN_pRH7mbcxD6kBUZtFGe', conversationid: 'test-123456' }) const requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization:
Bearer ${chatbaseApiKey}
}, body: raw, redirect: 'follow' } console.log(raw) const response = await, raw, requestOptions) const result = console.log(result) console.log(raw) console.log('Joren') // Save the result to the workflow object workflow.result = result // Additional actions with the result if needed console.log(result) console.log(raw) console.log('Joren')


01/11/2024, 3:32 PM
Sometimes this is a quick solution, if your chatbot is for some reason stuck in the previous state Type //state/reset in the Emulator for me that has fixed the problem many times


01/11/2024, 3:34 PM
Didn't work unfortunately