-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug fix webhook response not sending data to tinybird #7952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request addresses a bug in webhook response handling, ensuring proper data transmission to Tinybird for analytics.
- Updated
fetchGraphDataOrThrow.ts
to use 'webhookId' instead of 'webhookIdRequest' in API calls - Modified
call-webhook.job.ts
to include a 'success' boolean field in the analytics payload - Improved error handling in
call-webhook.job.ts
to conditionally include status code for failed requests - These changes enhance webhook analytics data quality and accuracy in Tinybird
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nit comments but LGTM!
@@ -14,7 +14,7 @@ export const fetchGraphDataOrThrow = async ({ | |||
}: fetchGraphDataOrThrowProps) => { | |||
const queryString = new URLSearchParams({ | |||
...WEBHOOK_GRAPH_API_OPTIONS_MAP[windowLength], | |||
webhookIdRequest: webhookId, | |||
webhookId: webhookId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant
@@ -46,10 +47,11 @@ export class CallWebhookJob { | |||
const eventInput = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part seems a bit redundant as well, shouldn't success be dependant on the response status / call failure? The rest seems very similar so I think it could be refactored a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Solves https://github.com/twentyhq/private-issues/issues/118
TLDR
Fix webhook response not sending data to tinybird when the url is not a link.
Changes in Tinybird:
In order to test