There are error and is_error fields that indicate whether an error occurred when delivering the webhook to the merchant server, but do not include any information on whether the merchant server even received the webhook.
To address this issue, we must include the following optional fields in the ClickHouse events:
status_code
delivery_attempt
initial_attempt_id
The fields would have to be added in the OutgoingWebhookEvent struct, and the corresponding columns must be added in the ClickHouse table. Once the fields have been added in code, the fields must be populated from the Event in the database:
The delivery_attempt and initial_attempt_id are available directly in the Event struct.
The status_code field is available within the response struct, if the webhook was delivered to the merchant server.
Hey @thegeek13242 thanks for your interest,
have assigned you the issue.
You can find the docs about setting up clickhouse locally for testing here. Can ask any doubts/questions about this on the issue or our discord/slack channels.
Description
As of opening this issue, the outgoing webhooks ClickHouse events contain a few fields:
https://github.com/juspay/hyperswitch/blob/ca61e47585071865cf7df5c05fdbe3f57818ca95/crates/router/src/events/outgoing_webhook_logs.rs#L11-L21
There are
error
andis_error
fields that indicate whether an error occurred when delivering the webhook to the merchant server, but do not include any information on whether the merchant server even received the webhook.To address this issue, we must include the following optional fields in the ClickHouse events:
status_code
delivery_attempt
initial_attempt_id
The fields would have to be added in the
OutgoingWebhookEvent
struct, and the corresponding columns must be added in the ClickHouse table. Once the fields have been added in code, the fields must be populated from theEvent
in the database:delivery_attempt
andinitial_attempt_id
are available directly in theEvent
struct.status_code
field is available within theresponse
struct, if the webhook was delivered to the merchant server.