Getting 400 client error, when triggering the workflow wiIth actor argument
I am building an application with angular frontend and django backend, I installed the package for python, when I triggered the workflow, it workd fine, but when I added the actor argument, 400 client error, is raised, can someone hep me with this?
9 Replies
Hey @karnativr, let's see if @Pawan Jain here can help you? @Moderator can you?
I reached out to him @Pawan Jain , he told he would need to check with maintainer of python SDK.
@karnativr give me some time.
I will debug with help of maintainer / moderator and give you an update
okay @Pawan Jain
no worries, small change I made in the code, its working now, will let you know, if there are any errors
@karnativr could you share that small change?
When I had this code, it threw me an error,
novu = EventApi(url, api_key).trigger(
name="follow",
recipients="demo-12345", actor= "demo-12" payload={ "text":"follower" },
) I thought, actor is a string,cause in the package it says it's a string,then I changed this to novu = EventApi(url, api_key).trigger( name="follow",
recipients="demo-12345", actor={ "subscriberId": "demo-12" }, payload={ "text":"follower" },
) It did work
recipients="demo-12345", actor= "demo-12" payload={ "text":"follower" },
) I thought, actor is a string,cause in the package it says it's a string,then I changed this to novu = EventApi(url, api_key).trigger( name="follow",
recipients="demo-12345", actor={ "subscriberId": "demo-12" }, payload={ "text":"follower" },
) It did work
@karnativr would you like to create a pr to update this docs?
We can add an example to trigger using topic in this section
https://github.com/novuhq/novu-python#events
Yeah sir
@karnativr Did you create a PR for this?
Can I help ?