mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-22 22:54:23 +01:00
do not throw 500 if using a pairing code which does not exists
This commit is contained in:
@@ -56,6 +56,8 @@ namespace BTCPayServer.Controllers
|
||||
throw new BitpayHttpException(400, "'id' property is required, alternatively, use BitId");
|
||||
|
||||
pairingEntity = await _TokenRepository.GetPairingAsync(request.PairingCode);
|
||||
if(pairingEntity == null)
|
||||
throw new BitpayHttpException(404, "The specified pairingCode is not found");
|
||||
pairingEntity.SIN = sin;
|
||||
|
||||
if(string.IsNullOrEmpty(pairingEntity.Label) && !string.IsNullOrEmpty(request.Label))
|
||||
|
||||
Reference in New Issue
Block a user