Prevent error 500 if bad psbt

This commit is contained in:
nicolas.dorier 2019-07-12 12:57:56 +09:00
parent 56976898bd
commit e6e9668bbb
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -141,7 +141,11 @@ namespace BTCPayServer.Controllers
var derivationSchemeSettings = await GetDerivationSchemeSettings(walletId); var derivationSchemeSettings = await GetDerivationSchemeSettings(walletId);
if (derivationSchemeSettings == null) if (derivationSchemeSettings == null)
return NotFound(); return NotFound();
await FetchTransactionDetails(derivationSchemeSettings, vm, network); try
{
await FetchTransactionDetails(derivationSchemeSettings, vm, network);
}
catch { return BadRequest(); }
return View(nameof(WalletPSBTReady), vm); return View(nameof(WalletPSBTReady), vm);
} }