1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/Exceptions/QuoteConversion.php

41 lines
857 B
PHP
Raw Normal View History

2023-06-26 13:05:15 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Exceptions;
use Exception;
2023-07-25 12:04:04 +02:00
use Illuminate\Http\JsonResponse;
2023-10-26 04:57:44 +02:00
use Illuminate\Http\Request;
2023-06-26 13:05:15 +02:00
class QuoteConversion extends Exception
{
/**
* Report the exception.
*
* @return void
*/
public function report()
{
//
}
/**
* Render the exception into an HTTP response.
*
* @param Request $request
2023-07-25 12:04:04 +02:00
* @return JsonResponse
2023-06-26 13:05:15 +02:00
*/
public function render($request)
{
return response()->json(['message' => 'This quote has already been converted. Cannot convert again.'], 400);
}
}