Augment webhook test error message

This commit is contained in:
Umar Bolatov
2021-04-25 20:30:10 -07:00
parent 9f6f74df59
commit 4671f08b64
2 changed files with 8 additions and 2 deletions

View File

@@ -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
};
}