N
Novu4mo 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 Barnea4mo ago
Hey @karnativr, let's see if @Pawan Jain here can help you? @Moderator can you?
karnativr
karnativr4mo ago
I reached out to him @Pawan Jain , he told he would need to check with maintainer of python SDK.
Pawan Jain
Pawan Jain4mo ago
@karnativr give me some time. I will debug with help of maintainer / moderator and give you an update
karnativr
karnativr4mo 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 Jain4mo ago
@karnativr could you share that small change?
karnativr
karnativr4mo 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 Jain4mo 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
karnativr4mo ago
Yeah sir
Pawan Jain
Pawan Jain4mo ago
@karnativr Did you create a PR for this? Can I help ?