mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #5912 from turbo124/v5-develop
Fixes for subscriptions
This commit is contained in:
commit
3f16f05b05
@ -36,6 +36,7 @@ use Symfony\Component\Console\Exception\CommandNotFoundException;
|
||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
@ -50,6 +51,7 @@ class Handler extends ExceptionHandler
|
||||
//Swift_TransportException::class,
|
||||
MaxAttemptsExceededException::class,
|
||||
CommandNotFoundException::class,
|
||||
ValidationException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -667,7 +667,10 @@ class SubscriptionService
|
||||
$client->company,
|
||||
);
|
||||
|
||||
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
|
||||
]);
|
||||
|
||||
return array_merge($body, ['exception' => json_decode($response->getBody(),true), 'status_code' => $response->getStatusCode()]);
|
||||
return json_decode($response->getBody(),true));
|
||||
}
|
||||
catch(\Exception $e)
|
||||
{
|
||||
//;
|
||||
// dd($e);
|
||||
$body = array_merge($body, ['exception' => ['message' => $e->getMessage(), 'status_code' => 500]]);
|
||||
return $body;
|
||||
|
||||
return ['message' => $e->getMessage(), 'status_code' => 500];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -70,8 +70,10 @@
|
||||
<p><b>{{ ctrans('texts.documents') }}:</b> {{ count($company->documents) }} </p>
|
||||
@endif
|
||||
|
||||
@if($check_data)
|
||||
<p><b>Data Quality:</b></p>
|
||||
<p> {!! $check_data !!} </p>
|
||||
@endif
|
||||
|
||||
@if(!empty($errors) )
|
||||
<p>{{ ctrans('texts.errors') }}:</p>
|
||||
|
Loading…
Reference in New Issue
Block a user