mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Improving error reporting API
This commit is contained in:
parent
3e4df4ff4f
commit
1a953c5bcb
@ -744,7 +744,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
$opts = [
|
$opts = [
|
||||||
CURLOPT_URL => PHANTOMJS_CLOUD . env('PHANTOMJS_CLOUD_KEY') . '/',
|
CURLOPT_URL => PHANTOMJS_CLOUD . env('PHANTOMJS_CLOUD_KEY') . '/',
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_CUSTOMREQUEST => 'POST',
|
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||||
CURLOPT_POST => 1,
|
CURLOPT_POST => 1,
|
||||||
CURLOPT_POSTFIELDS => $jsonEncodedData,
|
CURLOPT_POSTFIELDS => $jsonEncodedData,
|
||||||
CURLOPT_HTTPHEADER => [
|
CURLOPT_HTTPHEADER => [
|
||||||
@ -757,13 +757,9 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
|
|
||||||
Log::info($response);
|
|
||||||
|
|
||||||
$encodedString = strip_tags($response);
|
$encodedString = strip_tags($response);
|
||||||
$pdfString = Utils::decodePDF($encodedString);
|
$pdfString = Utils::decodePDF($encodedString);
|
||||||
|
|
||||||
Log::info($pdfString);
|
|
||||||
|
|
||||||
if ( ! $pdfString || strlen($pdfString) < 200) {
|
if ( ! $pdfString || strlen($pdfString) < 200) {
|
||||||
Utils::logError("PhantomJSCloud - failed to create pdf: {$encodedString}");
|
Utils::logError("PhantomJSCloud - failed to create pdf: {$encodedString}");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user