mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Pay endpoint: if JsonResponse is true, send error in json too
fixes #1532
This commit is contained in:
parent
b9ef5af5d7
commit
1d1c1141a3
@ -75,6 +75,11 @@ namespace BTCPayServer.Controllers
|
||||
catch (BitpayHttpException e)
|
||||
{
|
||||
ModelState.AddModelError("Store", e.Message);
|
||||
if (model.JsonResponse)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user