Api Calling issue on latest botpress 11 version


#1

There is some issue while calling API with the botpress latest version.

Here is my sample code snippet::

import { axios } from ‘axios’

const callApiMethod = async (state) => {

await axios.get(‘my_api_url’).then(res => {
console.log(res);

})

}
return callApiMethod(args.state)

(NOTE: axios is installed)
ERROR::
11:09:39.444 Actions Running “callApiMethod”
11:09:39.503 DialogEngine Error processing “callApiMethod {}”
Err: An error occurred while executing the action “callApiMethod”

Can someone please help me?


#2

I am also facing the same problem while calling api with botpress 11 version.

Can someone please help ?


#3

Can you put your axios-cal into try-catch statement and check what’s an exact error?
In the snippet you provided url my_api_url isn’t valid one.