Willem
Willem
NNovu
Created by Willem on 11/1/2024 in #💬│support
/v1/event/trigger 400 bad request: trigger is missing: actor object
@Dima Grossman is there any formal way of addressing this problem? It seems that checking for the truthiness of an actor property in the content of a notification is interpreted by the request validation as the actor to be required 😥
13 replies
NNovu
Created by Willem on 11/1/2024 in #💬│support
/v1/event/trigger 400 bad request: trigger is missing: actor object
I double checked and I'm updating and triggering the event from the right environment. I created a minimal reproducible workflow where I have an in-app notification that contains the following copy:
{{#if actor}}{{actor.avatar}}{{/if}}
{{#if actor}}{{actor.avatar}}{{/if}}
When I call this new trigger with the following payload:
{
"name": "test-actor",
"to": [
],
"payload": {}
}
{
"name": "test-actor",
"to": [
],
"payload": {}
}
I still get a 400 bad request error indicating that actor should be required. When I update the in app notification to just contain "hello", the trigger succeeds with the payload without actor defined.
13 replies
NNovu
Created by Willem on 11/1/2024 in #💬│support
/v1/event/trigger 400 bad request: trigger is missing: actor object
Is there some cache mechanism in place for workflows updated in the UI? When I'm hitting the triggers endpoint, it's still giving me back the 400 response. In the UI everything looking good now 👍
13 replies
NNovu
Created by Willem on 11/1/2024 in #💬│support
/v1/event/trigger 400 bad request: trigger is missing: actor object
@Dima Grossman, never mind, I found the issue. In the workflow I defined a particular notification that was expecting actor to be defined. This caused the trigger to respond with a 404400
13 replies
NNovu
Created by Willem on 11/1/2024 in #💬│support
/v1/event/trigger 400 bad request: trigger is missing: actor object
Hey @Dima Grossman, here's the payload I'm providing:
"payload": {
"type": "---",
"actionUrl": "--",
"ID": "--",
"title": "---h",
"companyName": "---",
"appBaseUrl": "---"
}
"payload": {
"type": "---",
"actionUrl": "--",
"ID": "--",
"title": "---h",
"companyName": "---",
"appBaseUrl": "---"
}
It does not contain a key "actor".
13 replies