Fix errors when handling api errors cont'd
This commit is contained in:
@@ -44,13 +44,13 @@ class BillplzTransactionSummaryController extends Controller
|
||||
$resolveBillplzPromise = function($promise){
|
||||
|
||||
try{
|
||||
$waitedPromise = $promise->wait();
|
||||
$billplzBillsPromise = $promise->wait();
|
||||
|
||||
if($waitedPromise->failed()){
|
||||
if($billplzBillsPromise->failed()){
|
||||
throw new \Exception('Something went wrong with the API');
|
||||
}
|
||||
|
||||
$billplzBillsPromise = $waitedPromise->json();
|
||||
$billplzBillsPromise = $billplzBillsPromise->json();
|
||||
|
||||
}catch(\Exception $e){
|
||||
Log::error("ArrahnPay Portal API request failed for URL: {$billplzBillsPromise->effectiveUri()->__toString()}", [
|
||||
|
||||
Reference in New Issue
Block a user