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:
Nicolas Dorier
2020-06-12 14:50:17 +09:00
committed by GitHub

View File

@@ -75,6 +75,11 @@ namespace BTCPayServer.Controllers
catch (BitpayHttpException e)
{
ModelState.AddModelError("Store", e.Message);
if (model.JsonResponse)
{
return BadRequest(ModelState);
}
return View();
}