diff --git a/app/Classes/General/Abstracts/AbstractControllerLogic.php b/app/Classes/General/Abstracts/AbstractControllerLogic.php index 2fdd0dab..9f8ba4b5 100644 --- a/app/Classes/General/Abstracts/AbstractControllerLogic.php +++ b/app/Classes/General/Abstracts/AbstractControllerLogic.php @@ -9,6 +9,7 @@ use App\Classes\ValueObjects\Constants\Notifications; use App\Classes\ValueObjects\Constants\HttpStatus; use App\Classes\ValueObjects\Response\ApiResponseObject; use ErrorException as GeneralExceptions; +use TypeError; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; @@ -60,7 +61,7 @@ abstract class AbstractControllerLogic return $response; - } catch (ErrorException|GeneralExceptions $exception){ + } catch (ErrorException|GeneralExceptions|TypeError $exception){ return (new ApiResponseObject($this->getNotificationTitle().' failed', $exception->getMessage(), $exception->getCode() ? $exception->getCode() : HttpStatus::SERVER_ERROR))->handler();