Webhook logging #516

Closed
opened 2025-12-29 08:29:23 +01:00 by adam · 1 comment
Owner

Originally created by @FKlintebackPure on GitHub (May 28, 2023).

Originally assigned to: @StefH on GitHub.

I could not get my webhooks working, and troubleshooting was tricky since Wiremock not checks for error responses.

A simple warning log would be helpful.

Alternatively, all webhook calls and responses could be logged and retrievable via the admin api.

Suggested code (in WireMockMiddleware.SendToWebHooksAsync):

var result = await webhookSender.SendAsync(httpClientForWebhook, mapping, webhookRequest, request, response).ConfigureAwait(false);
if (result.IsSuccessStatusCode) return;
_options.Logger.Warn($"Sending message to Webhook [{webHookIndex}] from Mapping '{mapping.Guid}' failed. Response: {result}");
Originally created by @FKlintebackPure on GitHub (May 28, 2023). Originally assigned to: @StefH on GitHub. I could not get my webhooks working, and troubleshooting was tricky since Wiremock not checks for error responses. A simple warning log would be helpful. Alternatively, all webhook calls and responses could be logged and retrievable via the admin api. Suggested code (in WireMockMiddleware.SendToWebHooksAsync): ``` var result = await webhookSender.SendAsync(httpClientForWebhook, mapping, webhookRequest, request, response).ConfigureAwait(false); if (result.IsSuccessStatusCode) return; _options.Logger.Warn($"Sending message to Webhook [{webHookIndex}] from Mapping '{mapping.Guid}' failed. Response: {result}"); ```
adam added the feature label 2025-12-29 08:29:23 +01:00
adam closed this issue 2025-12-29 08:29:23 +01:00
Author
Owner

@StefH commented on GitHub (May 28, 2023):

@FKlintebackPure
This will be added in next release.

https://github.com/WireMock-Net/WireMock.Net/pull/946

@StefH commented on GitHub (May 28, 2023): @FKlintebackPure This will be added in next release. https://github.com/WireMock-Net/WireMock.Net/pull/946
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#516