N
Novu10mo ago
karnativr

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
Tomer Barnea
Tomer Barnea10mo ago
Hey @karnativr, let's see if @Pawan Jain here can help you? @Moderator can you?
karnativr
karnativrOP10mo ago
I reached out to him @Pawan Jain , he told he would need to check with maintainer of python SDK.
Pawan Jain
Pawan Jain10mo ago
@karnativr give me some time. I will debug with help of maintainer / moderator and give you an update
karnativr
karnativrOP10mo ago
okay @Pawan Jain no worries, small change I made in the code, its working now, will let you know, if there are any errors
Pawan Jain
Pawan Jain10mo ago
@karnativr could you share that small change?
karnativr
karnativrOP10mo ago
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
Pawan Jain
Pawan Jain10mo ago
@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
karnativr
karnativrOP10mo ago
Yeah sir
Pawan Jain
Pawan Jain10mo ago
@karnativr Did you create a PR for this? Can I help ?
Want results from more Discord servers?
Add your server