1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Merge pull request #5912 from turbo124/v5-develop

Fixes for subscriptions
This commit is contained in:
David Bomba 2021-06-04 08:16:33 +10:00 committed by GitHub
commit 3f16f05b05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 7 deletions

View File

@ -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,
];
/**

View File

@ -667,7 +667,10 @@ class SubscriptionService
$client->company,
);
return $response;
if(is_array($body))
return $response;
else
return ['message' => 'There was a problem encountered with the webhook', 'status_code' => 500];
}

View File

@ -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];
}
}

View File

@ -70,9 +70,11 @@
<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>
<table>