mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Fix 404 exception caught at production laravel logs
This commit is contained in:
@@ -29,7 +29,12 @@ class CheckForStorageInvoiceByOrderId
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$orderId = $request->route('id');
|
||||
$storages = $this->storageInvoiceTransactionProcessor->execute($orderId);
|
||||
$storages = [];
|
||||
try{
|
||||
$storages = $this->storageInvoiceTransactionProcessor->execute($orderId);
|
||||
} catch (\Exception $exception) {
|
||||
$storages = [];
|
||||
}
|
||||
$request->merge(['storages' => $storages]);
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -215,6 +215,11 @@
|
||||
this.isLoading = false;
|
||||
this.order = response.payload.data;
|
||||
},
|
||||
errorHandler(error, status){
|
||||
if(status == 404){
|
||||
window.location.href = this.route('error.404');
|
||||
}
|
||||
},
|
||||
getStorageInfo(invoice) {
|
||||
const storageObject = this.findStorageInfoObject(invoice.id);
|
||||
return storageObject;
|
||||
|
||||
Reference in New Issue
Block a user