mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Greenfield: Show detailed Lightning routing error (#4722)
The implementations have more detailed messages for LN routing errors, which e.g. allow me to detect self-payemnts in LNbank. We pass those from the LN lib, so if we have it, we should display it to provide a better insight on what's going on when a rout cannot be found.
This commit is contained in:
@@ -256,7 +256,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
|||||||
|
|
||||||
return result.Result switch
|
return result.Result switch
|
||||||
{
|
{
|
||||||
PayResult.CouldNotFindRoute => this.CreateAPIError("could-not-find-route", "Impossible to find a route to the peer"),
|
PayResult.CouldNotFindRoute => this.CreateAPIError("could-not-find-route", result.ErrorDetail ?? "Impossible to find a route to the peer"),
|
||||||
PayResult.Error => this.CreateAPIError("generic-error", result.ErrorDetail),
|
PayResult.Error => this.CreateAPIError("generic-error", result.ErrorDetail),
|
||||||
PayResult.Unknown => Accepted(new LightningPaymentData
|
PayResult.Unknown => Accepted(new LightningPaymentData
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user