mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Augment webhook test error message
This commit is contained in:
parent
9f6f74df59
commit
4671f08b64
@ -128,7 +128,7 @@ namespace BTCPayServer.Controllers
|
||||
if (result.Success) {
|
||||
TempData[WellKnownTempData.SuccessMessage] = $"{viewModel.Type.ToString()} event delivered successfully!";
|
||||
} else {
|
||||
TempData[WellKnownTempData.ErrorMessage] = $"{viewModel.Type.ToString()} event could not be delivered";
|
||||
TempData[WellKnownTempData.ErrorMessage] = $"{viewModel.Type.ToString()} event could not be delivered. Error message received: {(result.ErrorMessage ?? "unknown")}";
|
||||
}
|
||||
|
||||
return View(nameof(TestWebhook));
|
||||
|
@ -299,6 +299,7 @@ namespace BTCPayServer.HostedServices
|
||||
{
|
||||
public string? DeliveryId { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string? ErrorMessage { get; set; }
|
||||
}
|
||||
|
||||
private async Task<DeliveryResult> SendDelivery(WebhookDeliveryRequest ctx)
|
||||
@ -338,7 +339,12 @@ namespace BTCPayServer.HostedServices
|
||||
}
|
||||
ctx.Delivery.SetBlob(deliveryBlob);
|
||||
|
||||
return new DeliveryResult() { Success = deliveryBlob.ErrorMessage is null, DeliveryId = ctx.Delivery.Id };
|
||||
return new DeliveryResult()
|
||||
{
|
||||
Success = deliveryBlob.ErrorMessage is null,
|
||||
DeliveryId = ctx.Delivery.Id,
|
||||
ErrorMessage = deliveryBlob.ErrorMessage
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user