diff --git a/README.md b/README.md index 2e68c3ac679d..4ef6d313b950 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![v5-develop phpunit](https://github.com/invoiceninja/invoiceninja/workflows/phpunit/badge.svg?branch=v5-develop) ![v5-stable phpunit](https://github.com/invoiceninja/invoiceninja/workflows/phpunit/badge.svg?branch=v5-stable) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d39acb4bf0f74a0698dc77f382769ba5)](https://www.codacy.com/app/turbo124/invoiceninja?utm_source=github.com&utm_medium=referral&utm_content=invoiceninja/invoiceninja&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d16c78aad8574466bf83232b513ef4fb)](https://www.codacy.com/gh/turbo124/invoiceninja/dashboard?utm_source=github.com&utm_medium=referral&utm_content=turbo124/invoiceninja&utm_campaign=Badge_Grade) # Invoice Ninja version 5! diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 05614471953f..0b9841f9ffe6 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -196,7 +196,7 @@ class Handler extends ExceptionHandler } elseif ($exception instanceof GenericPaymentDriverFailure && $request->expectsJson()) { return response()->json(['message' => $exception->getMessage()], 400); } elseif ($exception instanceof GenericPaymentDriverFailure) { - $data['message'] = $exception->getMessage(); + return response()->json(['message' => $exception->getMessage()], 400); } return parent::render($request, $exception);