mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 07:07:34 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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;
 | 
						|
use Illuminate\Http\Request;
 | 
						|
use Illuminate\Http\Response;
 | 
						|
 | 
						|
class YodleeApiException extends Exception
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Report the exception.
 | 
						|
     *
 | 
						|
     * @return void
 | 
						|
     */
 | 
						|
    public function report()
 | 
						|
    {
 | 
						|
        //
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Render the exception into an HTTP response.
 | 
						|
     *
 | 
						|
     * @param  Request  $request
 | 
						|
     * @return Response
 | 
						|
     */
 | 
						|
    public function render($request)
 | 
						|
    {
 | 
						|
        // $msg = 'Unable to refund the transaction';
 | 
						|
        $msg = ctrans('texts.error');
 | 
						|
 | 
						|
        if ($this->getMessage() && strlen($this->getMessage()) >= 1) {
 | 
						|
            $msg = $this->getMessage();
 | 
						|
        }
 | 
						|
 | 
						|
        return response()->json([
 | 
						|
            'message' => $msg,
 | 
						|
        ], 400);
 | 
						|
    }
 | 
						|
}
 |