mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
Merge pull request #1630 from Kukks/public-endpoint-json
Pay endpoint: if JsonResponse is true, send error in json too
This commit is contained in:
commit
0b7d5c839a
@ -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