mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 11:04:37 -04:00
Fixes for subscriptions
This commit is contained in:
parent
c800457a72
commit
c77660495c
@ -36,6 +36,7 @@ use Symfony\Component\Console\Exception\CommandNotFoundException;
|
|||||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
@ -50,6 +51,7 @@ class Handler extends ExceptionHandler
|
|||||||
//Swift_TransportException::class,
|
//Swift_TransportException::class,
|
||||||
MaxAttemptsExceededException::class,
|
MaxAttemptsExceededException::class,
|
||||||
CommandNotFoundException::class,
|
CommandNotFoundException::class,
|
||||||
|
ValidationException::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -667,7 +667,10 @@ class SubscriptionService
|
|||||||
$client->company,
|
$client->company,
|
||||||
);
|
);
|
||||||
|
|
||||||
return $response;
|
if(is_array($body))
|
||||||
|
return $response;
|
||||||
|
else
|
||||||
|
return ['message' => 'There was a problem encountered with the webhook', 'status_code' => 500];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,14 +40,13 @@ trait SubscriptionHooker
|
|||||||
RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
|
RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return array_merge($body, ['exception' => json_decode($response->getBody(),true), 'status_code' => $response->getStatusCode()]);
|
return json_decode($response->getBody(),true));
|
||||||
}
|
}
|
||||||
catch(\Exception $e)
|
catch(\Exception $e)
|
||||||
{
|
{
|
||||||
//;
|
|
||||||
// dd($e);
|
return ['message' => $e->getMessage(), 'status_code' => 500];
|
||||||
$body = array_merge($body, ['exception' => ['message' => $e->getMessage(), 'status_code' => 500]]);
|
|
||||||
return $body;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -70,9 +70,11 @@
|
|||||||
<p><b>{{ ctrans('texts.documents') }}:</b> {{ count($company->documents) }} </p>
|
<p><b>{{ ctrans('texts.documents') }}:</b> {{ count($company->documents) }} </p>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if($check_data)
|
||||||
<p><b>Data Quality:</b></p>
|
<p><b>Data Quality:</b></p>
|
||||||
<p> {!! $check_data !!} </p>
|
<p> {!! $check_data !!} </p>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if(!empty($errors) )
|
@if(!empty($errors) )
|
||||||
<p>{{ ctrans('texts.errors') }}:</p>
|
<p>{{ ctrans('texts.errors') }}:</p>
|
||||||
<table>
|
<table>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user